summaryrefslogtreecommitdiff
path: root/src/theme.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-01-13 00:51:50 +0100
committerpml68 <contact@pml68.dev>2025-01-13 00:51:50 +0100
commitabd22355755221a35c8328b8b209391bab4d89ee (patch)
tree959f6cf85fb17e61329100dff75fa554f5d5cb01 /src/theme.rs
parentMerge pull request #5 from pml68/feat/config (diff)
downloadiced-builder-abd22355755221a35c8328b8b209391bab4d89ee.tar.gz
ci: add build and lint workflows
Diffstat (limited to 'src/theme.rs')
-rw-r--r--src/theme.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/theme.rs b/src/theme.rs
index 7d18aa9..db16372 100644
--- a/src/theme.rs
+++ b/src/theme.rs
@@ -58,13 +58,13 @@ pub fn theme_from_str(
fn palette_to_string(palette: &iced::theme::Palette) -> String {
format!(
- r#"Palette {{
+ r"Palette {{
background: color!(0x{}),
text: color!(0x{}),
primary: color!(0x{}),
success: color!(0x{}),
danger: color!(0x{}),
- }}"#,
+ }}",
color_to_hex(palette.background),
color_to_hex(palette.text),
color_to_hex(palette.primary),
@@ -75,8 +75,8 @@ fn palette_to_string(palette: &iced::theme::Palette) -> String {
fn extended_to_string(extended: &Extended) -> String {
format!(
- r#"
-Extended{{background:Background{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},primary:Primary{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},secondary:Secondary{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},success:Success{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},danger:Danger{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},is_dark:true,}}"#,
+ r"
+Extended{{background:Background{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},primary:Primary{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},secondary:Secondary{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},success:Success{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},danger:Danger{{base:Pair{{color:color!(0x{}),text:color!(0x{}),}},weak:Pair{{color:color!(0x{}),text:color!(0x{}),}},strong:Pair{{color:color!(0x{}),text:color!(0x{}),}},}},is_dark:true,}}",
color_to_hex(extended.background.base.color),
color_to_hex(extended.background.base.text),
color_to_hex(extended.background.weak.color),