Commit a0d98c5e authored by Dimitris Kardarakos's avatar Dimitris Kardarakos

Add header to overlay sheets

Several overlay sheets are used across the application; add an
explanatory title to each of them.
parent d6f81703
Pipeline #21599 passed with stage
in 8 minutes and 49 seconds
......@@ -17,6 +17,11 @@ Kirigami.OverlaySheet {
property var operation
header: Kirigami.Heading {
level:1
text: i18n("Confirm")
}
contentItem: Controls2.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
......
......@@ -7,15 +7,22 @@
import QtQuick 2.0
import QtQuick.Controls 2.4 as Controls2
import QtQuick.Layouts 1.11
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kirigami 2.12 as Kirigami
Kirigami.OverlaySheet {
id: datePickerSheet
property alias selectedDate: calendarMonth.selectedDate
property string headerText
signal datePicked
header: Kirigami.Heading {
level:1
text: datePickerSheet.headerText
}
ColumnLayout {
Layout.preferredWidth: childrenRect.width + datePickerSheet.rightPadding + datePickerSheet.leftPadding
......
......@@ -11,6 +11,7 @@ Controls2.ToolButton {
id: root
property date selectorDate
property string selectorTitle
text: selectorDate.toLocaleDateString(Qt.locale(),Locale.NarrowFormat)
......@@ -22,6 +23,8 @@ Controls2.ToolButton {
DatePickerSheet {
id: datePickerSheet
headerText: root.selectorTitle
onDatePicked: root.selectorDate = selectedDate
}
}
......@@ -101,11 +101,14 @@ Kirigami.Page {
DateSelectorButton {
id: startDateSelector
selectorTitle: i18n("Start Date")
}
TimeSelectorButton {
id: startTimeSelector
selectorTitle: i18n("Start Time")
selectorDate: root.startDt
selectorHour: (root.incidenceData ? root.incidenceData.dtstart.getHours() : root.startDt.getHours() ) % 12
selectorMinutes: root.incidenceData ? root.incidenceData.dtstart.getMinutes() : root.startDt.getMinutes()
......@@ -122,6 +125,7 @@ Kirigami.Page {
id: endDateSelector
enabled: !allDaySelector.checked
selectorTitle: i18n("End Date")
Component.onCompleted: selectorDate = root.incidenceData ? root.incidenceData.dtend : new Date(root.startDt.getTime() + _calindoriConfig.eventsDuration*60000);// Do not bind, just initialize
}
......@@ -129,6 +133,7 @@ Kirigami.Page {
TimeSelectorButton {
id: endTimeSelector
selectorTitle: i18n("End Time")
selectorDate: root.endDt
selectorHour: root.endDt.getHours() % 12
selectorMinutes: root.endDt.getMinutes()
......
......@@ -5,7 +5,7 @@
*/
import QtQuick 2.7
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kirigami 2.12 as Kirigami
import QtQuick.Controls 2.5 as Controls
import QtQuick.Layouts 1.11
import org.kde.calindori 0.1 as Calindori
......@@ -26,6 +26,11 @@ Kirigami.OverlaySheet {
root.open();
}
header: Kirigami.Heading {
level:1
text: i18n("Repeat")
}
Kirigami.FormLayout {
Layout.preferredWidth: Kirigami.Units.gridUnit * 15
......
......@@ -7,7 +7,7 @@
import QtQuick 2.0
import QtQuick.Controls 2.4 as Controls2
import QtQuick.Layouts 1.11
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kirigami 2.12 as Kirigami
import org.kde.calindori 0.1 as Calindori
Kirigami.OverlaySheet {
......@@ -22,17 +22,18 @@ Kirigami.OverlaySheet {
signal offsetSelected
rightPadding: 0
leftPadding: 0
header: Kirigami.Heading {
level:1
text: i18n("New Reminder")
}
contentItem: ColumnLayout {
Kirigami.Heading {
level:2
text: i18n("Time before start")
Layout.alignment : Qt.AlignHCenter
}
Kirigami.Heading {
level:2
text: i18n("Time before start")
}
Kirigami.FormLayout {
Kirigami.FormLayout {
id: alarmOffsetPicker
Controls2.SpinBox {
......
......@@ -13,12 +13,18 @@ import org.kde.calindori 0.1 as Calindori
Kirigami.OverlaySheet {
id: timePickerSheet
property string headerText
property alias hours: timePicker.hours
property alias minutes: timePicker.minutes
property alias pm: timePicker.pm
signal datePicked
header: Kirigami.Heading {
level:1
text: timePickerSheet.headerText
}
contentItem: TimePicker {
id: timePicker
......
......@@ -10,6 +10,7 @@ import QtQuick.Controls 2.4 as Controls2
Controls2.ToolButton {
id: root
property string selectorTitle
property date selectorDate
property int selectorHour
property int selectorMinutes
......@@ -27,6 +28,8 @@ Controls2.ToolButton {
TimePickerSheet {
id: timePickerSheet
headerText: root.selectorTitle
onDatePicked: {
root.selectorHour = timePickerSheet.hours;
root.selectorMinutes = timePickerSheet.minutes;
......
......@@ -78,6 +78,7 @@ Kirigami.Page {
TimeSelectorButton {
id: startTimeSelector
selectorTitle: i18n("Start Time")
selectorDate: root.startDt
selectorHour: root.incidenceData ? root.incidenceData.dtstart.toLocaleTimeString(Qt.locale(), "hh") % 12 : 0
selectorMinutes: root.incidenceData ? root.incidenceData.dtstart.toLocaleTimeString(Qt.locale(), "mm") : 0
......
Markdown is supported
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