Fix Scrollable
width consistency
This commit is contained in:
parent
f1168187c9
commit
e1438774af
@ -93,6 +93,7 @@ impl Sandbox for Styling {
|
||||
ProgressBar::new(0.0..=100.0, self.slider_value).style(self.theme);
|
||||
|
||||
let scrollable = Scrollable::new(&mut self.scroll)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Units(100))
|
||||
.style(self.theme)
|
||||
.push(Text::new("Scroll me!"))
|
||||
|
@ -118,7 +118,7 @@ where
|
||||
Renderer: 'static + self::Renderer + column::Renderer,
|
||||
{
|
||||
fn width(&self) -> Length {
|
||||
Length::Fill
|
||||
Widget::<Message, Renderer>::width(&self.content)
|
||||
}
|
||||
|
||||
fn height(&self) -> Length {
|
||||
@ -132,7 +132,7 @@ where
|
||||
) -> layout::Node {
|
||||
let limits = limits
|
||||
.max_height(self.max_height)
|
||||
.width(Length::Fill)
|
||||
.width(Widget::<Message, Renderer>::width(&self.content))
|
||||
.height(self.height);
|
||||
|
||||
let child_limits = layout::Limits::new(
|
||||
|
Loading…
Reference in New Issue
Block a user