RTL support for config win Timers

v0.7
Michail Vourlakos 7 years ago
parent fc3c8e9fdb
commit 0b1499cd90

@ -40,6 +40,7 @@ PlasmaComponents.TextField {
font.italic: true font.italic: true
inputMethodHints: Qt.ImhDigitsOnly inputMethodHints: Qt.ImhDigitsOnly
placeholderText: i18n("none") placeholderText: i18n("none")
horizontalAlignment: Text.AlignLeft
width: internalContent.width + theme.mSize(theme.defaultFont).width * 3.5 width: internalContent.width + theme.mSize(theme.defaultFont).width * 3.5
@ -61,12 +62,14 @@ PlasmaComponents.TextField {
RowLayout { RowLayout {
id: internalContent id: internalContent
spacing: 0 spacing: 0
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right anchors.right: parent.right
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true
PlasmaComponents.Label { PlasmaComponents.Label {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
color: textField.textColor color: textField.textColor
@ -80,7 +83,9 @@ PlasmaComponents.TextField {
Layout.fillHeight: true Layout.fillHeight: true
Layout.preferredWidth: height Layout.preferredWidth: height
Layout.maximumWidth: height Layout.maximumWidth: height
Layout.leftMargin: 0.7 * theme.mSize(theme.defaultFont).width Layout.leftMargin: Qt.application.layoutDirection === Qt.RightToLeft ? 0 : 0.7 * theme.mSize(theme.defaultFont).width
Layout.rightMargin: Qt.application.layoutDirection === Qt.RightToLeft ? 0.7 * theme.mSize(theme.defaultFont).width : 0
text: "-" text: "-"
onClicked: decrement() onClicked: decrement()
} }

Loading…
Cancel
Save