Skip to main content

OverlayFeel

Struct OverlayFeel 

Source
pub struct OverlayFeel {
    pub window_drop_coverage: f32,
    pub center_drop_coverage: f32,
    pub fade_hold_time: f32,
    pub max_preference_time: f32,
    pub interact_expansion: f32,
    pub zone_edge_coverage: f32,
    pub zone_edges_below_tab_bar: bool,
    pub zone_tab_bar_stack_band: f32,
    pub drag_activation_distance: Vec2,
    pub restore_band: f32,
}
Expand description

Specifies the feel of the tab drop overlay, i.e. anything non-visual about the overlay.

Fields§

§window_drop_coverage: f32

range is 0.0..=1.0.

§center_drop_coverage: f32

range is 0.0..=1.0.

§fade_hold_time: f32

The amount of time windows should stay faded despite not needing to, prevents quick mouse movements from causing flashing.

§max_preference_time: f32

Amount of time the overlay waits before dropping a preference it may have for a node.

§interact_expansion: f32

Units which the buttons interact area will be expanded by.

§zone_edge_coverage: f32

With OverlayType::Zones, how much of a leaf’s width (left and right) or height (top and bottom) the band along each edge covers, in 0.0..=0.5: over a band, a dropped tab splits the leaf on that side; over the rest, it joins the leaf’s tabs. The height is the body’s, below the tab bar, with zone_edges_below_tab_bar. See DropZone::in_leaf.

§zone_edges_below_tab_bar: bool

With OverlayType::Zones, whether the edge bands (zone_edge_coverage) are laid on the leaf’s body, below its tab bar and the zone_tab_bar_stack_band, or on the whole leaf, tab bar included. On the whole leaf, the top band of a compact leaf lies mostly under its tab bar, leaving a thin strip of it right below the bar.

By Default it’s true; false, with a zone_tab_bar_stack_band of 0.0, gives the geometry of egui_stack 0.25.12 and before.

§zone_tab_bar_stack_band: f32

With OverlayType::Zones, the height in points of a band right under a leaf’s tab bar where a dropped tab joins the leaf’s tabs, as over the tab bar itself, whatever the edge bands say: a tab aimed at the tab bar and released a little low does not split the leaf.

By Default it’s 8.0, a third of a default tab bar’s height.

§drag_activation_distance: Vec2

How far, in points, the pointer must move from where it was pressed on a tab (or on the empty part of a tab bar) along x and along y before the tab (or the tab group) starts being dragged; further along either axis, it drags.

egui takes a press for a click until the pointer moves further than its click distance (egui::InputOptions::max_click_dist), so a distance at or below it starts the drag as soon as the press is no longer a click. A larger distance leaves a range where the press neither clicks nor drags, which can guard against moving a tab by accident.

By Default it’s 6.0 along both axes, egui’s default click distance.

§restore_band: f32

The breadth in points of a collapsed zone’s restore band, shown while a tab is dragged (Fold::Collapse, DockSpace::bind): a tab released on it brings the zone back. Bands on the same boundary stack, each this wide.

By Default it’s 8.0.

Trait Implementations§

Source§

impl Clone for OverlayFeel

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OverlayFeel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OverlayFeel

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.