diff --git a/src/app/mod.rs b/src/app/mod.rs index ad4b642c..641ca2db 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -809,7 +809,7 @@ impl ApplicationExt for App { }; let content_row = crate::widget::row::with_children({ - let mut widgets = Vec::with_capacity(4); + let mut widgets = Vec::with_capacity(3); // Insert nav bar onto the left side of the window. let has_nav = if let Some(nav) = self diff --git a/src/widget/context_drawer/widget.rs b/src/widget/context_drawer/widget.rs index a3c67c0c..b9ce7035 100644 --- a/src/widget/context_drawer/widget.rs +++ b/src/widget/context_drawer/widget.rs @@ -39,6 +39,8 @@ impl<'a, Message: Clone + 'static> ContextDrawer<'a, Message> { } = crate::theme::active().cosmic().spacing; let header = row::with_capacity(3) + .width(Length::Fixed(480.0)) + .align_y(Alignment::Center) .padding([space_m, space_l]) .push(Space::new(Length::FillPortion(1), Length::Fixed(0.0))) .push(text::heading(header).width(Length::FillPortion(1)).center()) @@ -49,9 +51,7 @@ impl<'a, Message: Clone + 'static> ContextDrawer<'a, Message> { .apply(container) .width(Length::FillPortion(1)) .align_x(Alignment::End), - ) - // XXX must be done after pushing elements or it may be overwritten by size hints from contents - .width(Length::Fixed(480.0)); + ); let pane = column::with_capacity(2).push(header).push( scrollable(container(drawer.into()).padding([0, space_l, space_l, space_l])) diff --git a/src/widget/header_bar.rs b/src/widget/header_bar.rs index a8dcf949..d9ba249f 100644 --- a/src/widget/header_bar.rs +++ b/src/widget/header_bar.rs @@ -286,7 +286,7 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> { }; // Creates the headerbar widget. - let mut widget = widget::row::with_capacity(4) + let mut widget = widget::row::with_capacity(3) // If elements exist in the start region, append them here. .push( widget::row::with_children(start) @@ -351,8 +351,7 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> { widget::text::heading(title) .apply(widget::container) - .center_x(Length::Fill) - .center_y(Length::Fill) + .center(Length::Fill) .into() } diff --git a/src/widget/list/column.rs b/src/widget/list/column.rs index cc0b517a..597a4b2f 100644 --- a/src/widget/list/column.rs +++ b/src/widget/list/column.rs @@ -41,13 +41,13 @@ impl<'a, Message: 'static> ListColumn<'a, Message> { } // Ensure a minimum height of 32. - let container = iced::widget::row![ - crate::widget::container(item).align_y(iced::Alignment::Center), + let list_item = iced::widget::row![ + item.into(), crate::widget::vertical_space().height(iced::Length::Fixed(32.)) ] .align_y(iced::Alignment::Center); - self.children.push(container.into()); + self.children.push(list_item.into()); self }