Commit 7065b026 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Use standard keys for view navigation actions



Signed-off-by: Claudio Cambra's avatarClaudio Cambra <claudio.cambra@gmail.com>
parent a60fe179
Pipeline #234107 canceled with stage
in 3 minutes and 48 seconds
......@@ -106,20 +106,21 @@ Kirigami.Page {
readonly property Kirigami.Action previousAction: Kirigami.Action {
icon.name: "go-previous"
text: i18n("Previous Week")
shortcut: "Left"
shortcut: StandardKey.MoveToPreviousPage
onTriggered: setToDate(DateUtils.addDaysToDate(pathView.currentItem.startDate, -root.daysToShow))
displayHint: Kirigami.DisplayHint.IconOnly
}
readonly property Kirigami.Action nextAction: Kirigami.Action {
icon.name: "go-next"
text: i18n("Next Week")
shortcut: "Right"
shortcut: StandardKey.MoveToNextPage
onTriggered: setToDate(DateUtils.addDaysToDate(pathView.currentItem.startDate, root.daysToShow))
displayHint: Kirigami.DisplayHint.IconOnly
}
readonly property Kirigami.Action todayAction: Kirigami.Action {
icon.name: "go-jump-today"
text: i18n("Now")
shortcut: StandardKey.MoveToStartOfLine
onTriggered: setToDate(new Date(), true, true);
}
......
......@@ -62,20 +62,21 @@ Kirigami.Page {
readonly property Kirigami.Action previousAction: Kirigami.Action {
icon.name: "go-previous"
text: i18n("Previous Month")
shortcut: "Left"
shortcut: StandardKey.MoveToPreviousPage
onTriggered: setToDate(DateUtils.addMonthsToDate(pathView.currentItem.firstDayOfMonth, -1))
displayHint: Kirigami.DisplayHint.IconOnly
}
readonly property Kirigami.Action nextAction: Kirigami.Action {
icon.name: "go-next"
text: i18n("Next Month")
shortcut: "Right"
shortcut: StandardKey.MoveToNextPage
onTriggered: setToDate(DateUtils.addMonthsToDate(pathView.currentItem.firstDayOfMonth, 1))
displayHint: Kirigami.DisplayHint.IconOnly
}
readonly property Kirigami.Action todayAction: Kirigami.Action {
icon.name: "go-jump-today"
text: i18n("Today")
shortcut: StandardKey.MoveToStartOfLine
onTriggered: setToDate(new Date())
}
actions {
......
......@@ -122,20 +122,21 @@ Kirigami.Page {
readonly property Kirigami.Action previousAction: Kirigami.Action {
icon.name: "go-previous"
text: i18n("Previous Month")
shortcut: "Left"
shortcut: StandardKey.MoveToPreviousPage
onTriggered: setToDate(DateUtils.addMonthsToDate(pathView.currentItem.firstDayOfMonth, -1))
displayHint: Kirigami.DisplayHint.IconOnly
}
readonly property Kirigami.Action nextAction: Kirigami.Action {
icon.name: "go-next"
text: i18n("Next Month")
shortcut: "Right"
shortcut: StandardKey.MoveToNextPage
onTriggered: setToDate(DateUtils.addMonthsToDate(pathView.currentItem.firstDayOfMonth, 1))
displayHint: Kirigami.DisplayHint.IconOnly
}
readonly property Kirigami.Action todayAction: Kirigami.Action {
icon.name: "go-jump-today"
text: i18n("Today")
shortcut: StandardKey.MoveToStartOfLine
onTriggered: setToDate(new Date())
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment