Update libcosmic
This commit is contained in:
parent
aed6b9b0c8
commit
f091b51888
4 changed files with 215 additions and 214 deletions
416
Cargo.lock
generated
416
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue