Update libcosmic

This commit is contained in:
Jeremy Soller 2023-03-23 14:20:48 -06:00
parent e788c175ec
commit 31a8427e10
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
4 changed files with 19 additions and 18 deletions

View file

@ -16,7 +16,7 @@ use cosmic::{
Padding, {Color, Element, Length, Point, Rectangle, Shell, Size},
},
iced_winit::renderer::BorderRadius,
theme::Theme,
theme::{Theme, ThemeType},
};
use cosmic_text::{Action, Edit, SwashCache};
use std::{cmp, sync::Mutex, time::Instant};
@ -32,12 +32,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),
},