fix(headerbar): center-align title even if start region is empty
This commit is contained in:
parent
43c78fa0df
commit
9ccd34b5ab
1 changed files with 3 additions and 3 deletions
|
|
@ -101,13 +101,13 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> {
|
|||
// Creates the headerbar widget.
|
||||
let mut widget = widget::row::with_capacity(4)
|
||||
// If elements exist in the start region, append them here.
|
||||
.push_maybe((!start.is_empty()).then(|| {
|
||||
.push(
|
||||
widget::row::with_children(start)
|
||||
.align_items(iced::Alignment::Center)
|
||||
.apply(widget::container)
|
||||
.align_x(iced::alignment::Horizontal::Left)
|
||||
.width(Length::Fill)
|
||||
}))
|
||||
.width(Length::Fill),
|
||||
)
|
||||
// If elements exist in the center region, use them here.
|
||||
// This will otherwise use the title as a widget if a title was defined.
|
||||
.push(if !center.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue