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 Element<'a, Message> = iced::Element<'a, Message, Renderer>;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -508,10 +508,11 @@ where
|
|||
|
||||
let mut layout_node = layout::Node::new(Size {
|
||||
width,
|
||||
height: width - offset,
|
||||
height: width,
|
||||
});
|
||||
|
||||
layout_node.move_to(Point {
|
||||
x: bounds.x + offset,
|
||||
x: bounds.x,
|
||||
y: bounds.y,
|
||||
});
|
||||
|
||||
|
|
@ -526,6 +527,9 @@ where
|
|||
viewport,
|
||||
);
|
||||
|
||||
bounds.x += offset;
|
||||
bounds.width -= offset;
|
||||
|
||||
alignment::Horizontal::Left
|
||||
} else {
|
||||
bounds.x = bounds.center_x();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue