37 lines
1,012 B
Text
37 lines
1,012 B
Text
import { VerticalBox, LineEdit, Button, DatePickerPopup } from "std-widgets.slint";
|
|
import { Timeline } from "timeline.slint";
|
|
|
|
export component ReviewWidget inherits VerticalBox {
|
|
property<int> current-year;
|
|
property<int> current-month;
|
|
property<int> current-day;
|
|
|
|
Timeline {
|
|
updating: false;
|
|
}
|
|
GridLayout {
|
|
spacing-vertical: 8px;
|
|
spacing-horizontal: 16px;
|
|
Text {
|
|
text: "Day: \{current-day}/\{current-month}/\{current-year}";
|
|
font-size: 32px;
|
|
horizontal-alignment: right;
|
|
}
|
|
Button {
|
|
text: "Select";
|
|
clicked => {
|
|
date-picker.show()
|
|
}
|
|
}
|
|
}
|
|
date-picker := DatePickerPopup {
|
|
x: (root.width - self.width) / 2;
|
|
y: (root.height - self.height) / 2;
|
|
title: "";
|
|
accepted(date) => {
|
|
current-year = date.year;
|
|
current-month = date.month;
|
|
current-day = date.day;
|
|
}
|
|
}
|
|
}
|