feat: sorta hacky way of creating header bars for libcosmic + update iced to get support for resizable windows in iced-sctk

This commit is contained in:
Ashley Wulber 2023-05-24 19:36:14 -04:00
parent bf1c474d08
commit 09abcfd03c
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
10 changed files with 43 additions and 15 deletions

View file

@ -577,17 +577,21 @@ impl Application for Window {
.padding([0, 8, 8, 8])
.width(Length::Fill)
.height(Length::Fill)
.style(theme::Container::Background)
.into();
let warning = warning(&self.warning_message)
.on_close(Message::ToggleWarning)
.into();
if self.show_warning {
column(vec![
column![
header,
warning,
iced::widget::vertical_space(Length::Fixed(12.0)).into(),
content,
])
container(column(vec![
warning,
iced::widget::vertical_space(Length::Fixed(12.0)).into(),
content,
]))
.style(theme::Container::Background)
]
.into()
} else {
column(vec![header, content]).into()