#[repr(C)]pub struct TitlebarMetrics {
pub button_side: TitlebarButtonSide,
pub buttons: TitlebarButtons,
pub height: OptionPixelValue,
pub button_area_width: OptionPixelValue,
pub padding_horizontal: OptionPixelValue,
pub safe_area: SafeAreaInsets,
pub title_font: OptionString,
pub title_font_size: OptionF32,
pub title_font_weight: OptionU16,
}Expand description
Metrics for titlebar layout and window chrome.
This provides information needed to correctly position custom titlebar
content when using WindowDecorations::NoTitle (expanded title mode).
Fields§
Which side the window control buttons are on
Which buttons are available
height: OptionPixelValueHeight of the titlebar in pixels
Width reserved for window control buttons (close/min/max) This is the space to avoid when drawing custom title text
padding_horizontal: OptionPixelValueHorizontal padding inside the titlebar
safe_area: SafeAreaInsetsSafe area insets for notched/rounded displays
title_font: OptionStringTitle text font (from SystemFonts::title_font)
title_font_size: OptionF32Title text font size
title_font_weight: OptionU16Title text font weight (400 = normal, 600 = semibold, 700 = bold)
Implementations§
Source§impl TitlebarMetrics
impl TitlebarMetrics
Sourcepub fn linux_gnome() -> Self
pub fn linux_gnome() -> Self
Linux GNOME-style titlebar (buttons on right by default)
Trait Implementations§
Source§impl Clone for TitlebarMetrics
impl Clone for TitlebarMetrics
Source§fn clone(&self) -> TitlebarMetrics
fn clone(&self) -> TitlebarMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TitlebarMetrics
impl Debug for TitlebarMetrics
Source§impl Default for TitlebarMetrics
impl Default for TitlebarMetrics
Source§impl PartialEq for TitlebarMetrics
impl PartialEq for TitlebarMetrics
impl StructuralPartialEq for TitlebarMetrics
Auto Trait Implementations§
impl Freeze for TitlebarMetrics
impl RefUnwindSafe for TitlebarMetrics
impl Send for TitlebarMetrics
impl Sync for TitlebarMetrics
impl Unpin for TitlebarMetrics
impl UnsafeUnpin for TitlebarMetrics
impl UnwindSafe for TitlebarMetrics
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