Expand description
Default TextSelectionStyle impl — the shipped look of the touch selection
handles and the magnifier.
An accent disc on an accent stem, ringed in the surface colour so it stays
visible over text of its own hue; a lens on the editor’s own background with
a hairline border. Apps that want another treatment write their own
impl TextSelectionStyle and install it theme-wide
(theme.style_slots.text_selection = Some(Rc::new(MyHandles))).
The dimensions are not this module’s to invent: they are
teksilo_core::text_touch’s constants, because the controller hit-tests a
handle from the same numbers the style paints it with, and two copies would
drift. Everything this file adds is which token each part is coloured from.
Structs§
- Recipe
Text Selection Style - Default
TextSelectionStyleshipped with Teksilo. Colours come from the active theme’s roles, so a theme swap repaints for free. - Text
Selection Recipe - Dimension recipe for
RecipeTextSelectionStyle.
Constants§
- HANDLE_
OUTLINE_ WIDTH - Width of the ring drawn around a handle’s disc, in dp.
- MAGNIFIER_
BORDER_ WIDTH - Width of the magnifier’s frame, in dp.
- MAGNIFIER_
CORNER_ RADIUS - Corner radius of the magnifier’s frame, in dp — zero, so the shipped lens is a rectangle.