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]
|
[dependencies.libcosmic]
|
||||||
git = "https://github.com/pop-os/libcosmic"
|
git = "https://github.com/pop-os/libcosmic"
|
||||||
rev = "843919e44f0a00c33c29358359be5b4bfa41ab00"
|
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["winit_softbuffer"]
|
features = ["winit_softbuffer"]
|
||||||
#path = "../libcosmic"
|
#path = "../libcosmic"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use cosmic::{
|
||||||
Alignment, Application, Color, Command, Length,
|
Alignment, Application, Color, Command, Length,
|
||||||
},
|
},
|
||||||
settings,
|
settings,
|
||||||
theme::{self, Theme},
|
theme::{self, Theme, ThemeType},
|
||||||
widget::{button, segmented_button, toggler, view_switcher},
|
widget::{button, segmented_button, toggler, view_switcher},
|
||||||
Element,
|
Element,
|
||||||
};
|
};
|
||||||
|
|
@ -174,7 +174,7 @@ impl Application for Window {
|
||||||
|
|
||||||
(
|
(
|
||||||
Window {
|
Window {
|
||||||
theme: Theme::Dark,
|
theme: Theme::dark(),
|
||||||
tab_model,
|
tab_model,
|
||||||
},
|
},
|
||||||
Command::none(),
|
Command::none(),
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use cosmic::{
|
||||||
widget::{self, tree, Widget},
|
widget::{self, tree, Widget},
|
||||||
Padding, {Color, Element, Length, Point, Rectangle, Shell, Size},
|
Padding, {Color, Element, Length, Point, Rectangle, Shell, Size},
|
||||||
},
|
},
|
||||||
theme::Theme,
|
theme::{Theme, ThemeType},
|
||||||
};
|
};
|
||||||
use cosmic_text::{Action, Edit, SwashCache};
|
use cosmic_text::{Action, Edit, SwashCache};
|
||||||
use std::{cmp, sync::Mutex, time::Instant};
|
use std::{cmp, sync::Mutex, time::Instant};
|
||||||
|
|
@ -28,12 +28,12 @@ pub trait StyleSheet {
|
||||||
|
|
||||||
impl StyleSheet for Theme {
|
impl StyleSheet for Theme {
|
||||||
fn appearance(&self) -> Appearance {
|
fn appearance(&self) -> Appearance {
|
||||||
match self {
|
match self.theme_type {
|
||||||
Theme::Dark => Appearance {
|
ThemeType::Dark | ThemeType::HighContrastDark => Appearance {
|
||||||
background_color: Some(Color::from_rgb8(0x34, 0x34, 0x34)),
|
background_color: Some(Color::from_rgb8(0x34, 0x34, 0x34)),
|
||||||
text_color: Color::from_rgb8(0xFF, 0xFF, 0xFF),
|
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)),
|
background_color: Some(Color::from_rgb8(0xFC, 0xFC, 0xFC)),
|
||||||
text_color: Color::from_rgb8(0x00, 0x00, 0x00),
|
text_color: Color::from_rgb8(0x00, 0x00, 0x00),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue