Make util function available + improve VTag

This commit is contained in:
Vyn 2025-06-26 10:11:53 +02:00
parent 9592f1b18d
commit 0fa6be0b1a
Signed by: vyn
GPG key ID: E1B2BE34E7A971E7
2 changed files with 15 additions and 3 deletions

View file

@ -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<color> 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;

View file

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