refactor: introduce thread local THEME variable and distinguish between custom and system theme settings

This commit is contained in:
Ashley Wulber 2023-08-04 15:48:34 -04:00 committed by Ashley Wulber
parent 40efcbbe31
commit 6c57e04e36
8 changed files with 80 additions and 36 deletions

View file

@ -1,5 +1,4 @@
use apply::Apply;
use cosmic::iced::widget::{horizontal_space, row, scrollable};
use cosmic::iced::widget::{horizontal_space, row};
use cosmic::iced::{Alignment, Length};
use cosmic::widget::{button, segmented_button, view_switcher};
use cosmic::{theme, Element};
@ -60,7 +59,7 @@ impl State {
self.pages.remove(id);
}
pub(super) fn view<'a>(&'a self, window: &'a super::Window) -> Element<'a, Message> {
pub(super) fn view<'a>(&'a self, _window: &'a super::Window) -> Element<'a, Message> {
let tabs = view_switcher::horizontal(&self.pages)
.show_close_icon_on_hover(true)
.on_activate(Message::Activate)