diff options
| author | pml68 <contact@pml68.dev> | 2025-01-13 00:51:50 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-01-13 00:51:50 +0100 |
| commit | abd22355755221a35c8328b8b209391bab4d89ee (patch) | |
| tree | 959f6cf85fb17e61329100dff75fa554f5d5cb01 /src/theme.rs | |
| parent | Merge pull request #5 from pml68/feat/config (diff) | |
| download | iced-builder-abd22355755221a35c8328b8b209391bab4d89ee.tar.gz | |
ci: add build and lint workflows
Diffstat (limited to '')
| -rw-r--r-- | src/theme.rs | 8 |
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), |
