mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 18:23:19 +00:00
Move dependencies in 'external' directory and pdate git submodules
This commit is contained in:
parent
63bf267a22
commit
cbaa1b58d8
608 changed files with 198659 additions and 199 deletions
|
@ -1,42 +0,0 @@
|
|||
import { VLabeledComponent } from "LabeledComponent.slint";
|
||||
import { VText } from "Text.slint";
|
||||
import { Palette } from "Palette.slint";
|
||||
|
||||
export component VCheckBox {
|
||||
in-out property<string> text;
|
||||
in property <brush> color <=> textComponent.color;
|
||||
in-out property<bool> checked: false;
|
||||
|
||||
callback toggled(bool); // toggled(state: bool)
|
||||
|
||||
HorizontalLayout {
|
||||
spacing: 8px;
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
if checked : Rectangle {
|
||||
background: Palette.accent;
|
||||
height: 1rem;
|
||||
width: self.height;
|
||||
border-radius: 32px;
|
||||
}
|
||||
if !checked : Rectangle {
|
||||
border-color: Palette.accent;
|
||||
border-width: 2px;
|
||||
height: 1rem;
|
||||
width: self.height;
|
||||
border-radius: 32px;
|
||||
}
|
||||
}
|
||||
textComponent := VText {
|
||||
text: root.text;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
|
||||
ta := TouchArea {
|
||||
clicked => {
|
||||
checked = !checked;
|
||||
root.toggled(checked)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue