expose OverflowAxis::Hidden as Overflow functions (#17528)
# Objective expose `OverflowAxis::Hidden` as functions of `Overflow`, just as it is done for `OverflowAxis::Hidden` and `OverflowAxis::Scroll`.
This commit is contained in:
parent
203d0b4aae
commit
51bb4f08a9
@ -1064,6 +1064,30 @@ impl Overflow {
|
||||
}
|
||||
}
|
||||
|
||||
/// Hide overflowing items on both axes by influencing layout and then clipping
|
||||
pub const fn hidden() -> Self {
|
||||
Self {
|
||||
x: OverflowAxis::Hidden,
|
||||
y: OverflowAxis::Hidden,
|
||||
}
|
||||
}
|
||||
|
||||
/// Hide overflowing items on the x axis by influencing layout and then clipping
|
||||
pub const fn hidden_x() -> Self {
|
||||
Self {
|
||||
x: OverflowAxis::Hidden,
|
||||
y: OverflowAxis::Visible,
|
||||
}
|
||||
}
|
||||
|
||||
/// Hide overflowing items on the y axis by influencing layout and then clipping
|
||||
pub const fn hidden_y() -> Self {
|
||||
Self {
|
||||
x: OverflowAxis::Visible,
|
||||
y: OverflowAxis::Hidden,
|
||||
}
|
||||
}
|
||||
|
||||
/// Overflow is visible on both axes
|
||||
pub const fn is_visible(&self) -> bool {
|
||||
self.x.is_visible() && self.y.is_visible()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user