pub struct ColorWheel { /* private fields */ }Expand description
Picks hue and saturation on a disc, by a drag or the arrow keys: left and right turn the hue, up and down change the saturation, with Shift for bigger steps. Holding Shift during a drag keeps the hue. A double click or Home takes the color out, keeping the hue.
use ravenrs_reactive::State;
use ravenrs_widgets::{ColorWheel, HueSaturation};
let tint = State::new(HueSaturation::new(30.0, 0.4));
let wheel = ColorWheel::new(tint.binding()).diameter(140.0).label("Shadows");Implementations§
Source§impl ColorWheel
impl ColorWheel
Sourcepub fn new(value: Binding<HueSaturation>) -> Self
pub fn new(value: Binding<HueSaturation>) -> Self
A wheel bound to value, 160 logical pixels wide.
Sourcepub fn brightness(self, brightness: f32) -> Self
pub fn brightness(self, brightness: f32) -> Self
How bright the disc is drawn, from 0 to 1 (1 by default). It changes only the look.
Trait Implementations§
Source§impl Debug for ColorWheel
impl Debug for ColorWheel
Auto Trait Implementations§
impl !RefUnwindSafe for ColorWheel
impl !Send for ColorWheel
impl !Sync for ColorWheel
impl !UnwindSafe for ColorWheel
impl Freeze for ColorWheel
impl Unpin for ColorWheel
impl UnsafeUnpin for ColorWheel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.