mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 10:13:42 +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
18
external/slint-vynui/Button.slint
vendored
18
external/slint-vynui/Button.slint
vendored
|
@ -5,9 +5,11 @@ export component VButton inherits Rectangle {
|
|||
|
||||
in property<string> text;
|
||||
in property<brush> text-color: Palette.foreground;
|
||||
in property<length> text-size: 1rem;
|
||||
in property<image> icon-source;
|
||||
in property<brush> icon-colorize;
|
||||
in property<brush> icon-colorize: Palette.foreground;
|
||||
in property<length> icon-size: 1rem;
|
||||
in property <string> icon-svg;
|
||||
in property enabled <=> ta.enabled;
|
||||
callback clicked;
|
||||
|
||||
|
@ -27,9 +29,20 @@ export component VButton inherits Rectangle {
|
|||
HorizontalLayout {
|
||||
alignment: center;
|
||||
spacing: 8px;
|
||||
padding: 8px;
|
||||
padding: 16px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
if root.icon-svg != "" : VerticalLayout {
|
||||
alignment: center;
|
||||
Path {
|
||||
padding: 8px;
|
||||
commands: root.icon-svg;
|
||||
stroke: icon-colorize;
|
||||
stroke-width: 2px;
|
||||
width: icon-size;
|
||||
height: icon-size;
|
||||
}
|
||||
}
|
||||
if root.icon-source.width != 0 : Image {
|
||||
padding: 8px;
|
||||
source: icon-source;
|
||||
|
@ -39,6 +52,7 @@ export component VButton inherits Rectangle {
|
|||
if root.text != "" : VerticalLayout {
|
||||
VText {
|
||||
text: root.text;
|
||||
font-size: root.text-size;
|
||||
color: root.text-color;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue