Skip to content

Commit 917a8dc

Browse files
Better padding for quick actions menu
1 parent 61a4be5 commit 917a8dc

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

ui/components/ghost-button.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export component GhostButton inherits VerticalLayout {
1212
]
1313

1414
container := Rectangle {
15-
height: t.height * 2;
15+
min-height: t.height * 2;
1616
min-width: t.width * 1.5;
1717
border-radius: 10px;
1818
//background: red;

ui/pages/quick-actions-page.slint

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ component QuickAction inherits Rectangle
1313
width: 100%;
1414

1515
HorizontalLayout {
16+
padding-right: StyleMetrics.layout-padding / 2;
1617
spacing: StyleMetrics.layout-spacing;
1718
Image {
1819
source: Icons.action;
@@ -22,9 +23,12 @@ component QuickAction inherits Rectangle
2223

2324
Text { text: quick-action; horizontal-stretch: 1; vertical-alignment: center; overflow: elide; }
2425

25-
GhostButton {
26+
SmallButton {
2627
text: "Run";
2728
width: 50px;
29+
vertical-stretch: 1;
30+
border-radius: 10px;
31+
clicked => { QuickActions.execute_quick_action(quick-action); }
2832
}
2933
}
3034
}
@@ -38,6 +42,8 @@ export component QuickActionsPage inherits Page
3842
VerticalLayout {
3943
alignment: start;
4044
spacing: StyleMetrics.layout-spacing * 1.5;
45+
padding-top: StyleMetrics.layout-padding / 2;
46+
4147
for quick-action in QuickActions.quick-actions: QuickAction { quick-action: quick-action; }
4248
}
4349
}

0 commit comments

Comments
 (0)