mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 01:33:19 +00:00
Add new 'Add task/event' bar directly in the main view
This commit is contained in:
parent
534da46a26
commit
2aa039e5fc
18 changed files with 399 additions and 51 deletions
24
external/slint-vynui/TextInput.slint
vendored
24
external/slint-vynui/TextInput.slint
vendored
|
@ -1,13 +1,31 @@
|
|||
import { VLabeledComponent } from "LabeledComponent.slint";
|
||||
import { Palette } from "Palette.slint";
|
||||
import { VText } from "Text.slint";
|
||||
|
||||
export component VTextInput inherits VLabeledComponent {
|
||||
in-out property text <=> textInputComponent.text;
|
||||
out property has-focus <=> textInputComponent.has-focus;
|
||||
in-out property placeholder <=> textInputComponent.accessible-placeholder-text;
|
||||
in-out property wrap <=> textInputComponent.wrap;
|
||||
callback accepted();
|
||||
|
||||
textInputComponent := TextInput {
|
||||
color: Palette.foreground;
|
||||
accepted => { root.accepted() }
|
||||
VerticalLayout {
|
||||
padding: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
textInputComponent := TextInput {
|
||||
color: Palette.foreground;
|
||||
accepted => { root.accepted() }
|
||||
HorizontalLayout {
|
||||
alignment: start;
|
||||
VText {
|
||||
visible: textInputComponent.text == "";
|
||||
color: Palette.foreground-hint;
|
||||
text: root.placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue