pub struct ActionTileGeometry {
pub compact: bool,
pub leading_rect: Option<Rect>,
pub title_rect: Rect,
pub subtitle_rect: Option<Rect>,
pub trailing_rect: Rect,
}Expand description
Where paint_action_tile puts each part of a tile. Build it to size a
tile for the theme’s text, or to place a control in the slot that
ActionTilePaint::trailing_width keeps clear; painting uses the same
geometry.
Fields§
§compact: boolWhether the title is alone, centered vertically, without the subtitle. A tile without a subtitle, or 46 or less tall, is compact.
leading_rect: Option<Rect>The icon, or the leading tone dot.
title_rect: Rect§subtitle_rect: Option<Rect>Where the subtitle goes, unless the tile is compact.
trailing_rect: RectThe trailing slot, inside the tile’s padding and its full height.
Implementations§
Source§impl ActionTileGeometry
impl ActionTileGeometry
pub fn new( theme: &DefaultTheme, rect: Rect, has_icon: bool, has_subtitle: bool, style: ActionTilePaint, ) -> Self
Sourcepub fn height(theme: &DefaultTheme, has_subtitle: bool) -> f32
pub fn height(theme: &DefaultTheme, has_subtitle: bool) -> f32
The height a tile needs to fit its title, and its subtitle when it has one, at the theme’s text sizes.
Trait Implementations§
Source§impl Clone for ActionTileGeometry
impl Clone for ActionTileGeometry
impl Copy for ActionTileGeometry
Source§impl Debug for ActionTileGeometry
impl Debug for ActionTileGeometry
Source§impl PartialEq for ActionTileGeometry
impl PartialEq for ActionTileGeometry
impl StructuralPartialEq for ActionTileGeometry
Auto Trait Implementations§
impl Forget for ActionTileGeometry
impl Freeze for ActionTileGeometry
impl Move for ActionTileGeometry
impl RefUnwindSafe for ActionTileGeometry
impl Send for ActionTileGeometry
impl Sync for ActionTileGeometry
impl Unpin for ActionTileGeometry
impl UnsafeUnpin for ActionTileGeometry
impl UnwindSafe for ActionTileGeometry
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