mirror of
https://github.com/obhq/obliteration.git
synced 2025-04-02 11:02:08 -04:00
33 lines
782 B
Text
33 lines
782 B
Text
import { HorizontalBox, Button, StandardButton, Palette } from "std-widgets.slint";
|
|
|
|
export component NavBar inherits Rectangle {
|
|
in property <string> back-text;
|
|
in property <bool> back-enabled;
|
|
in property <string> next-text;
|
|
|
|
callback back-clicked <=> back.clicked;
|
|
callback next-clicked <=> next.clicked;
|
|
pure callback cancel();
|
|
|
|
background: Palette.alternate-background;
|
|
|
|
HorizontalBox {
|
|
alignment: end;
|
|
|
|
back := Button {
|
|
text: root.back-text;
|
|
enabled: root.back-enabled;
|
|
}
|
|
|
|
next := Button {
|
|
text: root.next-text;
|
|
}
|
|
|
|
StandardButton {
|
|
kind: StandardButtonKind.cancel;
|
|
clicked => {
|
|
cancel();
|
|
}
|
|
}
|
|
}
|
|
}
|