summaryrefslogtreecommitdiff
path: root/src/panes/style.rs
diff options
context:
space:
mode:
authorPolesznyák Márk László <116908301+pml68@users.noreply.github.com>2025-04-29 23:35:39 +0200
committerGitHub <noreply@github.com>2025-04-29 23:35:39 +0200
commitca50c308f0058af80e9125ba00a1349877169968 (patch)
tree38fbd5c78c90487e5b641f635d01c4a614ddfd44 /src/panes/style.rs
parentMerge pull request #14 from pml68/dependabot/cargo/windows_exe_info-0.5.1 (diff)
parentstyle: `theme` -> `appearance` (diff)
downloadiced-builder-ca50c308f0058af80e9125ba00a1349877169968.tar.gz
Merge pull request #20 from pml68/feat/custom-theme
Diffstat (limited to 'src/panes/style.rs')
-rw-r--r--src/panes/style.rs23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/panes/style.rs b/src/panes/style.rs
index 1eefb2d..acca6f9 100644
--- a/src/panes/style.rs
+++ b/src/panes/style.rs
@@ -1,24 +1,25 @@
use iced::widget::container::Style;
-use iced::{Border, Theme};
+use iced::{Background, Border};
+use material_theme::Theme;
pub fn title_bar(theme: &Theme) -> Style {
- let palette = theme.extended_palette();
+ let surface = theme.colors().surface;
Style {
- text_color: Some(palette.background.strong.text),
- background: Some(palette.background.strong.color.into()),
+ text_color: Some(surface.on_surface),
+ background: Some(Background::Color(surface.surface_container.high)),
..Default::default()
}
}
pub fn pane_active(theme: &Theme) -> Style {
- let palette = theme.extended_palette();
+ let surface = theme.colors().surface;
Style {
- background: Some(palette.background.weak.color.into()),
+ background: Some(Background::Color(surface.surface_container.low)),
border: Border {
width: 1.0,
- color: palette.background.strong.color,
+ color: surface.surface_container.high,
..Border::default()
},
..Default::default()
@@ -26,13 +27,13 @@ pub fn pane_active(theme: &Theme) -> Style {
}
pub fn pane_focused(theme: &Theme) -> Style {
- let palette = theme.extended_palette();
+ let surface = theme.colors().surface;
Style {
- background: Some(palette.background.weak.color.into()),
+ background: Some(Background::Color(surface.surface_container.low)),
border: Border {
- width: 4.0,
- color: palette.background.strong.color,
+ width: 2.0,
+ color: surface.surface_container.high,
..Border::default()
},
..Default::default()