mirror of
https://codeberg.org/vyn/selenite.git
synced 2025-07-01 17:23:18 +00:00
Make util function available + improve VTag
This commit is contained in:
parent
9592f1b18d
commit
0fa6be0b1a
2 changed files with 15 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -27,4 +27,6 @@ struct Palette {
|
|||
|
||||
std::optional<Palette> parseJson(const std::string &path);
|
||||
|
||||
Color hexStringToColor(const std::string &hexString);
|
||||
|
||||
} // namespace selenite
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue