[Plasma Components 3] Fix RTL in some widgets.

Summary: Some widgets are missed up in RTL mode, this should fix it.

Reviewers: #plasma, #frameworks, mart

Reviewed By: #plasma, mart

Subscribers: mart, broulik, davidedmundson, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D7715
This commit is contained in:
Safa AlFulaij 2017-09-07 00:38:32 +03:00
parent 52146278f5
commit 940adc7e6e
4 changed files with 8 additions and 3 deletions

View File

@ -65,6 +65,7 @@ T.ComboBox {
text: control.displayText text: control.displayText
font: control.font font: control.font
color: theme.buttonTextColor color: theme.buttonTextColor
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
} }
@ -94,6 +95,7 @@ T.ComboBox {
} }
popup: T.Popup { popup: T.Popup {
x: control.mirrored ? control.width - width : 0
y: control.height y: control.height
width: Math.max(control.width, 150) width: Math.max(control.width, 150)
implicitHeight: contentItem.implicitHeight implicitHeight: contentItem.implicitHeight
@ -119,7 +121,7 @@ T.ComboBox {
color: theme.viewBackgroundColor color: theme.viewBackgroundColor
border.color: Qt.rgba(theme.textColor.r, theme.textColor.g, theme.textColor.b, 0.3) border.color: Qt.rgba(theme.textColor.r, theme.textColor.g, theme.textColor.b, 0.3)
layer.enabled: true layer.enabled: true
layer.effect: DropShadow { layer.effect: DropShadow {
transparentBorder: true transparentBorder: true
radius: 4 radius: 4

View File

@ -30,10 +30,11 @@ T.ProgressBar {
hoverEnabled: true hoverEnabled: true
contentItem: Item { contentItem: Item {
scale: control.mirrored ? -1 : 1
PlasmaCore.FrameSvgItem { PlasmaCore.FrameSvgItem {
id: indicator id: indicator
height: parent.height height: parent.height
width: control.indeterminate ? units.gridUnit * 2 : parent.width * control.visualPosition width: control.indeterminate ? units.gridUnit * 2 : parent.width * control.position
imagePath: "widgets/bar_meter_horizontal" imagePath: "widgets/bar_meter_horizontal"
prefix: "bar-active" prefix: "bar-active"
colorGroup: PlasmaCore.ColorScope.colorGroup colorGroup: PlasmaCore.ColorScope.colorGroup

View File

@ -95,6 +95,7 @@ T.RangeSlider {
width: horizontal ? control.availableWidth : implicitWidth width: horizontal ? control.availableWidth : implicitWidth
height: horizontal ? implicitHeight : control.availableHeight height: horizontal ? implicitHeight : control.availableHeight
anchors.centerIn: parent anchors.centerIn: parent
scale: horizontal && control.mirrored ? -1 : 1
PlasmaCore.FrameSvgItem { PlasmaCore.FrameSvgItem {
imagePath: "widgets/slider" imagePath: "widgets/slider"

View File

@ -73,6 +73,7 @@ T.Slider {
width: horizontal ? control.availableWidth : implicitWidth width: horizontal ? control.availableWidth : implicitWidth
height: horizontal ? implicitHeight : control.availableHeight height: horizontal ? implicitHeight : control.availableHeight
anchors.centerIn: parent anchors.centerIn: parent
scale: horizontal && control.mirrored ? -1 : 1
PlasmaCore.FrameSvgItem { PlasmaCore.FrameSvgItem {
imagePath: "widgets/slider" imagePath: "widgets/slider"
@ -82,7 +83,7 @@ T.Slider {
width: parent.horizontal ? control.position * parent.width : parent.width width: parent.horizontal ? control.position * parent.width : parent.width
height: parent.horizontal ? parent.height : control.position * parent.height height: parent.horizontal ? parent.height : control.position * parent.height
} }
Repeater { Repeater {
id: repeater id: repeater
model: control.stepSize > 0 ? 1 + (control.to - control.from) / control.stepSize : 0 model: control.stepSize > 0 ? 1 + (control.to - control.from) / control.stepSize : 0