mirror of
https://codeberg.org/vyn/selenite.git
synced 2025-07-03 01:53:18 +00:00
Various minor improvements
This commit is contained in:
parent
a2aeeea421
commit
00857b287f
4 changed files with 25 additions and 12 deletions
|
@ -10,20 +10,24 @@ export component VButton inherits Rectangle {
|
|||
in property<brush> icon-colorize: Palette.foreground;
|
||||
in property<length> icon-size: 1rem;
|
||||
in property <string> icon-svg;
|
||||
in property <brush> background-color: Palette.control-background;
|
||||
in property enabled <=> ta.enabled;
|
||||
callback clicked;
|
||||
callback double-clicked;
|
||||
|
||||
private property<bool> active: false;
|
||||
|
||||
background: enabled ? Palette.control-background : Palette.control-background.darker(0.2);
|
||||
background: enabled ? root.background-color : Palette.control-background.darker(0.2);
|
||||
border-radius: 4px;
|
||||
|
||||
ta := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
clicked => {
|
||||
active = !active;
|
||||
root.clicked();
|
||||
}
|
||||
double-clicked => {
|
||||
root.double-clicked();
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue