pub struct TextSelectionTheme {
pub selection_color: Option<Color>,
pub handle_color: Option<Color>,
pub cursor_color: Option<Color>,
}Expand description
How a selection in text that is not a field looks — a
selectable text’s and a SelectionArea’s.
A field has its own (TextFieldTheme::handle_color); this is for the words around it.
SelectionArea::selection_color and
SelectionArea::handle_color set it for one area.
Fields§
§selection_color: Option<Color>The highlight under the selected words. Unset, the theme’s selection.
handle_color: Option<Color>The handles under a touch selection. Unset, the scheme’s primary.
cursor_color: Option<Color>A text field’s caret (milestone 659) — the reference keeps it here too. Unset, the
scheme’s primary.
Implementations§
Source§impl TextSelectionTheme
impl TextSelectionTheme
Sourcepub fn selection_color_in(&self, theme: &Theme) -> Color
pub fn selection_color_in(&self, theme: &Theme) -> Color
The highlight, resolved against theme.
Sourcepub fn handle_color_in(&self, theme: &Theme) -> Color
pub fn handle_color_in(&self, theme: &Theme) -> Color
The handles’ colour, resolved against theme.
Trait Implementations§
Source§impl Clone for TextSelectionTheme
impl Clone for TextSelectionTheme
impl Copy for TextSelectionTheme
Source§impl Debug for TextSelectionTheme
impl Debug for TextSelectionTheme
Source§impl Default for TextSelectionTheme
impl Default for TextSelectionTheme
Source§impl PartialEq for TextSelectionTheme
impl PartialEq for TextSelectionTheme
impl StructuralPartialEq for TextSelectionTheme
Auto Trait Implementations§
impl Freeze for TextSelectionTheme
impl RefUnwindSafe for TextSelectionTheme
impl Send for TextSelectionTheme
impl Sync for TextSelectionTheme
impl Unpin for TextSelectionTheme
impl UnsafeUnpin for TextSelectionTheme
impl UnwindSafe for TextSelectionTheme
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