mirror of
https://codeberg.org/vyn/selenite.git
synced 2025-07-02 01:23:23 +00:00
Add helpers to setup Selenite in C++ projects
This commit is contained in:
parent
e27b4c150b
commit
f3025d08cd
20 changed files with 24870 additions and 11 deletions
31
components/Tag.slint
Normal file
31
components/Tag.slint
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { Palette } from "Palette.slint";
|
||||
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 size <=> text-component.font-size;
|
||||
in property background-color <=> self.background;
|
||||
|
||||
callback clicked;
|
||||
|
||||
background: Palette.control-background;
|
||||
border-radius: 8px;
|
||||
|
||||
ta := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
clicked => {
|
||||
root.clicked();
|
||||
}
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
alignment: center;
|
||||
text-component := VText {
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue