1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-06 16:58:17 +03:00

improve a bit the comboboxes rtl layout

This commit is contained in:
Michail Vourlakos 2017-11-28 20:50:55 +02:00
parent 3726bf78bb
commit 97ba64799e
3 changed files with 14 additions and 5 deletions

View File

@ -96,11 +96,15 @@ PlasmaComponents.Page {
var selText = " ";
if (layouts[i] === layoutManager.currentLayoutName) {
selText = "✔ ";
selText = Qt.application.layoutDirection === Qt.RightToLeft ? " ✔" : "✔ ";
activeLayout = i;
}
layoutTexts.push(selText+layouts[i]);
if (Qt.application.layoutDirection === Qt.RightToLeft) {
layoutTexts.push(" " + layouts[i] + selText);
} else {
layoutTexts.push(selText+layouts[i]);
}
}
model = layoutTexts;

View File

@ -69,8 +69,9 @@ PlasmaComponents.Page {
screenRow.visible = false;
var screens = []
var rtlSpace = Qt.application.layoutDirection === Qt.RightToLeft ? " " : "";
screens.push(i18n("On Primary"));
screens.push(rtlSpace + i18n("On Primary"));
//check if the screen exists, it is used in cases Latte is moving
//the dock automatically to primaryScreen in order for the user
@ -82,10 +83,10 @@ PlasmaComponents.Page {
}
if (!screenExists && !dock.onPrimary)
screens.push(dock.currentScreen);
screens.push(rtlSpace + dock.currentScreen);
for (var i = 0; i < dock.screens.length; i++) {
screens.push(dock.screens[i].name)
screens.push(rtlSpace + dock.screens[i].name)
}
screenCmb.model = screens;

View File

@ -408,6 +408,10 @@ FocusScope {
//overlayed button
PlasmaComponents.Button {
id: addDock
anchors.left: Qt.application.layoutDirection === Qt.RightToLeft ? undefined : parent.left
anchors.right: Qt.application.layoutDirection === Qt.RightToLeft ? parent.right : undefined
LayoutMirroring.enabled: false
width: parent.width - units.iconSizes.medium + 2*units.smallSpacing
height: parent.height