hotfix(StatusDatePicker): fix some UI issues

- make selectedDate read/write for preselecting the date
- minor toolbar spacing/sizing fixes
This commit is contained in:
Lukáš Tinkl 2022-08-08 23:20:41 +02:00
parent 56f36ed627
commit 39b1bcfe6b
1 changed files with 10 additions and 1 deletions

View File

@ -38,7 +38,7 @@ StatusComboBox {
This property holds the currently selected date. This property holds the currently selected date.
\sa QtQml.Date \sa QtQml.Date
*/ */
readonly property alias selectedDate: d.selectedDate property alias selectedDate: d.selectedDate
QtObject { QtObject {
id: d id: d
@ -64,7 +64,10 @@ StatusComboBox {
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: 2 Layout.columnSpan: 2
spacing: 0
StatusFlatButton { StatusFlatButton {
leftPadding: 8
rightPadding: 8
text: "<<" text: "<<"
onClicked: grid.year = grid.year - 1 onClicked: grid.year = grid.year - 1
StatusToolTip { StatusToolTip {
@ -73,6 +76,8 @@ StatusComboBox {
} }
} }
StatusFlatButton { StatusFlatButton {
leftPadding: 8
rightPadding: 8
text: "<" text: "<"
onClicked: { onClicked: {
// switch to previous month (and optionally prev year in January) // switch to previous month (and optionally prev year in January)
@ -102,6 +107,8 @@ StatusComboBox {
} }
} }
StatusFlatButton { StatusFlatButton {
leftPadding: 8
rightPadding: 8
text: ">" text: ">"
onClicked: { onClicked: {
// switch to next month (and optionally next year in December) // switch to next month (and optionally next year in December)
@ -116,6 +123,8 @@ StatusComboBox {
} }
} }
StatusFlatButton { StatusFlatButton {
leftPadding: 8
rightPadding: 8
text: ">>" text: ">>"
onClicked: grid.year = grid.year + 1 onClicked: grid.year = grid.year + 1
StatusToolTip { StatusToolTip {