Compare commits

...

2 commits

Author SHA1 Message Date
Vyn
0fa6be0b1a
Make util function available + improve VTag 2025-06-26 10:11:53 +02:00
Vyn
9592f1b18d
Update default colors 2025-06-25 12:05:50 +02:00
3 changed files with 20 additions and 8 deletions

View file

@ -29,7 +29,7 @@
// ---- // ----
export global Palette { export global Palette {
in-out property<brush> accent: Colors.cyan.darker(0.4); in-out property<brush> accent: #56b6c2;
in-out property<brush> foreground: #abb2bf; in-out property<brush> foreground: #abb2bf;
in-out property<brush> foreground-hint: foreground.darker(0.2); in-out property<brush> foreground-hint: foreground.darker(0.2);
in-out property<brush> background: #282c34; in-out property<brush> background: #282c34;
@ -38,8 +38,8 @@ export global Palette {
in-out property<brush> popup-border: Colors.grey; in-out property<brush> popup-border: Colors.grey;
in-out property<brush> control-foreground: #abb2bf; in-out property<brush> control-foreground: #abb2bf;
in-out property<brush> control-background: #393f4a; in-out property<brush> control-background: #393f4a;
in-out property<brush> card-background: background.brighter(0.2); in-out property<brush> card-background: #3b3f4c;
in-out property<brush> green: Colors.greenyellow; in-out property<brush> green: #98c379;
in-out property<brush> orange: Colors.orange; in-out property<brush> orange: #d19a66;
in-out property<brush> red: Colors.red; in-out property<brush> red: #e86671;
} }

View file

@ -4,14 +4,24 @@ import { VText } from "Text.slint";
export component VTag inherits Rectangle { export component VTag inherits Rectangle {
in property text <=> text-component.text; in property text <=> text-component.text;
in property text-color <=> text-component.color; in property<color> text-color;
in property size <=> text-component.font-size; in property size <=> text-component.font-size;
in property background-color <=> self.background; in property background-color <=> self.background;
callback clicked; callback clicked;
background: Palette.control-background; background: Palette.card-background;
border-radius: 8px; 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 { ta := TouchArea {
mouse-cursor: pointer; mouse-cursor: pointer;

View file

@ -27,4 +27,6 @@ struct Palette {
std::optional<Palette> parseJson(const std::string &path); std::optional<Palette> parseJson(const std::string &path);
Color hexStringToColor(const std::string &hexString);
} // namespace selenite } // namespace selenite