fix: wrong size variant in sizable trait (#493)
This commit is contained in:
parent
5874c6974f
commit
8260b5f6a0
1 changed files with 7 additions and 6 deletions
|
|
@ -208,6 +208,7 @@ pub trait Disableable {
|
|||
}
|
||||
|
||||
/// A trait for setting the size of an element.
|
||||
/// Size::Medium is use by default.
|
||||
pub trait Sizable: Sized {
|
||||
/// Set the ui::Size of this element.
|
||||
///
|
||||
|
|
@ -215,17 +216,17 @@ pub trait Sizable: Sized {
|
|||
/// Or a `Pixels` to set a custom size: `px(30.)`
|
||||
fn with_size(self, size: impl Into<Size>) -> Self;
|
||||
|
||||
/// Set to Size::Small
|
||||
fn small(self) -> Self {
|
||||
self.with_size(Size::Small)
|
||||
}
|
||||
|
||||
/// Set to Size::XSmall
|
||||
fn xsmall(self) -> Self {
|
||||
self.with_size(Size::XSmall)
|
||||
}
|
||||
|
||||
/// Set to Size::Medium
|
||||
/// Set to Size::Small
|
||||
fn small(self) -> Self {
|
||||
self.with_size(Size::Small)
|
||||
}
|
||||
|
||||
/// Set to Size::Large
|
||||
fn large(self) -> Self {
|
||||
self.with_size(Size::Large)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue