Update libcosmic

This commit is contained in:
Jeremy Soller 2023-03-14 13:41:49 -06:00
parent aed6b9b0c8
commit f091b51888
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
4 changed files with 215 additions and 214 deletions

416
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -17,7 +17,6 @@ features = ["syntect"]
[dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic"
rev = "843919e44f0a00c33c29358359be5b4bfa41ab00"
default-features = false
features = ["winit_softbuffer"]
#path = "../libcosmic"

View file

@ -7,7 +7,7 @@ use cosmic::{
Alignment, Application, Color, Command, Length,
},
settings,
theme::{self, Theme},
theme::{self, Theme, ThemeType},
widget::{button, segmented_button, toggler, view_switcher},
Element,
};
@ -174,7 +174,7 @@ impl Application for Window {
(
Window {
theme: Theme::Dark,
theme: Theme::dark(),
tab_model,
},
Command::none(),

View file

@ -12,7 +12,7 @@ use cosmic::{
widget::{self, tree, Widget},
Padding, {Color, Element, Length, Point, Rectangle, Shell, Size},
},
theme::Theme,
theme::{Theme, ThemeType},
};
use cosmic_text::{Action, Edit, SwashCache};
use std::{cmp, sync::Mutex, time::Instant};
@ -28,12 +28,12 @@ pub trait StyleSheet {
impl StyleSheet for Theme {
fn appearance(&self) -> Appearance {
match self {
Theme::Dark => Appearance {
match self.theme_type {
ThemeType::Dark | ThemeType::HighContrastDark => Appearance {
background_color: Some(Color::from_rgb8(0x34, 0x34, 0x34)),
text_color: Color::from_rgb8(0xFF, 0xFF, 0xFF),
},
Theme::Light => Appearance {
ThemeType::Light | ThemeType::HighContrastLight => Appearance {
background_color: Some(Color::from_rgb8(0xFC, 0xFC, 0xFC)),
text_color: Color::from_rgb8(0x00, 0x00, 0x00),
},