2 import Sailfish.Silica 1.0
6 // Amended version of /usr/share/jolla-clock/pages/ClockEditDialog.qml
10 property alias hour: timePicker.hour
11 property alias minute: timePicker.minute
13 property Item timePicker: timePicker
14 //: Can have two values: "LTR" if remaining time in timer item should be written in "[value] [unit]" order i.e. "2 min", or "RTL" i.e. right-to-left like in Arabic writing systems
15 property bool leftToRight: qsTr("LTR") !== "RTL"
19 // The effective value will be restricted by ApplicationWindow.allowedOrientations
20 allowedOrientations: Orientation.All
24 contentHeight: column.height
25 flickableDirection: Flickable.VerticalFlick
31 spacing: Theme.paddingLarge
37 height: childrenRect.height
41 anchors.horizontalCenter: parent.horizontalCenter
42 // otherwise in 12h mode this caused timer 00:00 to display as 12:00am
43 hourMode: DateTime.TwentyFourHours
47 anchors.centerIn: parent
49 spacing: -Theme.paddingMedium
51 spacing: Theme.paddingSmall
52 anchors.horizontalCenter: parent.horizontalCenter
53 layoutDirection: leftToRight ? Qt.LeftToRight : Qt.RightToLeft
56 text: timePicker.hour.toLocaleString()
57 font.pixelSize: Theme.fontSizeHuge
58 height: Math.min(implicitHeight, (timePicker.height*0.4 - timerLabelColumn.spacing)/2)
59 fontSizeMode: Text.VerticalFit
63 //: "Hour abbrevation. Should be short form if possible."
65 anchors.baseline: hours.baseline
70 spacing: Theme.paddingSmall
71 anchors.horizontalCenter: parent.horizontalCenter
72 layoutDirection: leftToRight ? Qt.LeftToRight : Qt.RightToLeft
75 text: timePicker.minute.toLocaleString()
76 font.pixelSize: Theme.fontSizeHuge
77 height: Math.min(implicitHeight, (timePicker.height*0.4 - timerLabelColumn.spacing)/2)
78 fontSizeMode: Text.VerticalFit
82 //: "Minute abbrevation. Should be short form if possible."
84 anchors.baseline: minutes.baseline
85 verticalAlignment: Text.AlignBottom