fix(segmented-button): disappearance of icons from bad layout values
This commit is contained in:
parent
ef23cb328f
commit
48fd076cc8
2 changed files with 6 additions and 4 deletions
|
|
@ -61,5 +61,3 @@ pub mod widget;
|
||||||
|
|
||||||
pub type Renderer = iced::Renderer<Theme>;
|
pub type Renderer = iced::Renderer<Theme>;
|
||||||
pub type Element<'a, Message> = iced::Element<'a, Message, Renderer>;
|
pub type Element<'a, Message> = iced::Element<'a, Message, Renderer>;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -508,10 +508,11 @@ where
|
||||||
|
|
||||||
let mut layout_node = layout::Node::new(Size {
|
let mut layout_node = layout::Node::new(Size {
|
||||||
width,
|
width,
|
||||||
height: width - offset,
|
height: width,
|
||||||
});
|
});
|
||||||
|
|
||||||
layout_node.move_to(Point {
|
layout_node.move_to(Point {
|
||||||
x: bounds.x + offset,
|
x: bounds.x,
|
||||||
y: bounds.y,
|
y: bounds.y,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -526,6 +527,9 @@ where
|
||||||
viewport,
|
viewport,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
bounds.x += offset;
|
||||||
|
bounds.width -= offset;
|
||||||
|
|
||||||
alignment::Horizontal::Left
|
alignment::Horizontal::Left
|
||||||
} else {
|
} else {
|
||||||
bounds.x = bounds.center_x();
|
bounds.x = bounds.center_x();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue