diff options
author | 2020-03-25 14:31:25 +0100 | |
---|---|---|
committer | 2020-03-25 14:31:25 +0100 | |
commit | 643fa18cae19fa1418a23b652b6b4b8bf8ef79fc (patch) | |
tree | c40bf003b7702cdc751c4d6b4adfd79c3ff63633 /style/src | |
parent | fd7d9622e333a0a2cd5c2e8e6cc38cc09d7981e4 (diff) | |
parent | bc10ca501ba012dbd379ade93e27bc012c08c2f1 (diff) | |
download | iced-643fa18cae19fa1418a23b652b6b4b8bf8ef79fc.tar.gz iced-643fa18cae19fa1418a23b652b6b4b8bf8ef79fc.tar.bz2 iced-643fa18cae19fa1418a23b652b6b4b8bf8ef79fc.zip |
Merge pull request #202 from FabianLars/master
Text Selection for text_input widget
Diffstat (limited to 'style/src')
-rw-r--r-- | style/src/text_input.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/style/src/text_input.rs b/style/src/text_input.rs index c5123b20..1cb72364 100644 --- a/style/src/text_input.rs +++ b/style/src/text_input.rs @@ -33,6 +33,8 @@ pub trait StyleSheet { fn value_color(&self) -> Color; + fn selection_color(&self) -> Color; + /// Produces the style of an hovered text input. fn hovered(&self) -> Style { self.focused() @@ -65,6 +67,10 @@ impl StyleSheet for Default { fn value_color(&self) -> Color { Color::from_rgb(0.3, 0.3, 0.3) } + + fn selection_color(&self) -> Color { + Color::from_rgb(0.8, 0.8, 1.0) + } } impl std::default::Default for Box<dyn StyleSheet> { |