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, ) -> ActionTileGeometry
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
Source§fn clone(&self) -> ActionTileGeometry
fn clone(&self) -> ActionTileGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.