Include Cosmic theme in libcosmic, instead of in Iced fork

I think it's best to only include things in the Iced fork that can't be
done without forking Iced, and/or are expected to be merged upstream.
The theme doesn't seem to be either, so it fits more appropriately in
libcosmic.

That should make it easier to keep up with upstream, and it may help to
have all the Cosmic parts in one place.

Based on https://github.com/pop-os/iced commit ad9026e.
This commit is contained in:
Ian Douglas Scott 2022-10-28 21:59:41 -07:00 committed by Jeremy Soller
parent a6d93de47f
commit 947532413a
13 changed files with 1145 additions and 19 deletions

View file

@ -4,11 +4,13 @@ use cosmic::{
checkbox, column, container, horizontal_space, pick_list, progress_bar, radio, row, slider,
text,
},
iced::{self, theme, Alignment, Application, Color, Command, Element, Length, Theme},
iced::{self, Alignment, Application, Color, Command, Length},
iced_lazy::responsive,
iced_winit::window::{drag, maximize, minimize},
list_view, list_view_item, list_view_row, list_view_section, scrollable,
theme::{self, Theme},
widget::{button, header_bar, list_box, list_row, list_view::*, toggler},
Element,
};
use std::collections::BTreeMap;
@ -106,7 +108,7 @@ impl Application for Window {
}
fn view(&self) -> Element<Message> {
let mut header: Element<Message, _> = header_bar()
let mut header: Element<Message> = header_bar()
.title(self.title())
.nav_title(String::from("Settings"))
.sidebar_active(self.sidebar_toggled)