From 9592f1b18d149e1cf76a32df419f6ed3db2af3d6 Mon Sep 17 00:00:00 2001 From: Vyn Date: Wed, 25 Jun 2025 12:05:50 +0200 Subject: [PATCH 1/2] Update default colors --- components/Palette.slint | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/Palette.slint b/components/Palette.slint index 0a69cb2..a3fbc82 100644 --- a/components/Palette.slint +++ b/components/Palette.slint @@ -29,7 +29,7 @@ // ---- export global Palette { - in-out property accent: Colors.cyan.darker(0.4); + in-out property accent: #56b6c2; in-out property foreground: #abb2bf; in-out property foreground-hint: foreground.darker(0.2); in-out property background: #282c34; @@ -38,8 +38,8 @@ export global Palette { in-out property popup-border: Colors.grey; in-out property control-foreground: #abb2bf; in-out property control-background: #393f4a; - in-out property card-background: background.brighter(0.2); - in-out property green: Colors.greenyellow; - in-out property orange: Colors.orange; - in-out property red: Colors.red; + in-out property card-background: #3b3f4c; + in-out property green: #98c379; + in-out property orange: #d19a66; + in-out property red: #e86671; } From 0fa6be0b1abe9534a8a1252496b7c97219c1559e Mon Sep 17 00:00:00 2001 From: Vyn Date: Thu, 26 Jun 2025 10:11:53 +0200 Subject: [PATCH 2/2] Make util function available + improve VTag --- components/Tag.slint | 16 +++++++++++++--- cpp/include/selenite/palette.h | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/components/Tag.slint b/components/Tag.slint index 6180058..35ace09 100644 --- a/components/Tag.slint +++ b/components/Tag.slint @@ -4,14 +4,24 @@ import { VText } from "Text.slint"; export component VTag inherits Rectangle { in property text <=> text-component.text; - in property text-color <=> text-component.color; + in property text-color; in property size <=> text-component.font-size; in property background-color <=> self.background; callback clicked; - background: Palette.control-background; - border-radius: 8px; + background: Palette.card-background; + border-radius: 8phx; + clip: true; + border-color: text-color; + border-width: 1phx; + + Rectangle { + width: 100%; + height: 100%; + background: root.text-color; + opacity: 0.05; + } ta := TouchArea { mouse-cursor: pointer; diff --git a/cpp/include/selenite/palette.h b/cpp/include/selenite/palette.h index eabf912..db099e5 100644 --- a/cpp/include/selenite/palette.h +++ b/cpp/include/selenite/palette.h @@ -27,4 +27,6 @@ struct Palette { std::optional parseJson(const std::string &path); +Color hexStringToColor(const std::string &hexString); + } // namespace selenite