pub struct Interaction {
pub interact_radius: f32,
pub resize_grab_radius_side: f32,
pub resize_grab_radius_corner: f32,
pub show_tooltips_only_when_still: bool,
pub tooltip_delay: f32,
pub tooltip_grace_time: f32,
pub selectable_labels: bool,
pub multi_widget_text_select: bool,
}
Expand description
How and when interaction happens.
Fields§
§interact_radius: f32
How close a widget must be to the mouse to have a chance to register as a click or drag.
If this is larger than zero, it gets easier to hit widgets, which is important for e.g. touch screens.
resize_grab_radius_side: f32
Radius of the interactive area of the side of a window during drag-to-resize.
resize_grab_radius_corner: f32
Radius of the interactive area of the corner of a window during drag-to-resize.
show_tooltips_only_when_still: bool
If false
, tooltips will show up anytime you hover anything, even if mouse is still moving
tooltip_delay: f32
Delay in seconds before showing tooltips after the mouse stops moving
tooltip_grace_time: f32
If you have waited for a tooltip and then hover some other widget within
this many seconds, then show the new tooltip right away,
skipping Self::tooltip_delay
.
This lets the user quickly move over some dead space to hover the next thing.
selectable_labels: bool
Can you select the text on a crate::Label
by default?
multi_widget_text_select: bool
Can the user select text that span multiple labels?
The default is true
, but text selection can be slightly glitchy,
so you may want to disable it.
Implementations§
Trait Implementations§
Source§impl Clone for Interaction
impl Clone for Interaction
Source§fn clone(&self) -> Interaction
fn clone(&self) -> Interaction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more