fix(header_bar): shrink start and end

This commit is contained in:
Jeremy Soller 2024-01-10 12:56:07 -07:00 committed by GitHub
parent 6850e53855
commit 9fb3d874e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> {
.align_items(iced::Alignment::Center) .align_items(iced::Alignment::Center)
.apply(widget::container) .apply(widget::container)
.align_x(iced::alignment::Horizontal::Left) .align_x(iced::alignment::Horizontal::Left)
.width(Length::Fill), .width(Length::Shrink),
) )
// If elements exist in the center region, use them here. // If elements exist in the center region, use them here.
// This will otherwise use the title as a widget if a title was defined. // This will otherwise use the title as a widget if a title was defined.
@ -127,7 +127,7 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> {
.align_items(iced::Alignment::Center) .align_items(iced::Alignment::Center)
.apply(widget::container) .apply(widget::container)
.align_x(iced::alignment::Horizontal::Right) .align_x(iced::alignment::Horizontal::Right)
.width(Length::Fill), .width(Length::Shrink),
) )
.height(Length::Fixed(50.0)) .height(Length::Fixed(50.0))
.padding(8) .padding(8)