Skip to content
Snippets Groups Projects
Commit 4769a78c authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

RTL: fix shortcut keyboard and download folder setting

GitLab: #1133

Change-Id: If71e23c23974d74345d68469606cb3cc25e78b30
parent afb9211e
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,13 @@
import QtQuick
import QtQuick.Layouts
import net.jami.Constants 1.1
import net.jami.Adapters 1.1
RowLayout {
id: root
layoutDirection: UtilsAdapter.isRTL ? Qt.RightToLeft : Qt.LeftToRight
Rectangle {
id: descriptionTextRect
......@@ -29,6 +32,7 @@ RowLayout {
Layout.preferredHeight: descriptionText.contentHeight + 10
Layout.preferredWidth: descriptionText.contentWidth + 10
Layout.leftMargin: 10
Layout.rightMargin: 10
color: JamiTheme.transparentColor
......@@ -50,6 +54,7 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
Layout.preferredHeight: shortcutText.contentHeight + 10
Layout.preferredWidth: shortcutText.contentWidth + 10
Layout.leftMargin: 10
Layout.rightMargin: 10
color: JamiTheme.backgroundColor
......
......@@ -284,7 +284,8 @@ Window {
font.pointSize: JamiTheme.titleFontSize
text: {
switch (selectionBar.currentIndex) {
var modelId = UtilsAdapter.isRTL ? 4 - selectionBar.currentIndex : selectionBar.currentIndex
switch (modelId) {
case 0:
return JamiStrings.generalSettingsTitle;
case 1:
......@@ -312,7 +313,8 @@ Window {
height: parent.height - titleRect.height - JamiTheme.titleRectMargin - keyboardShortCutList.anchors.topMargin - selectionBar.height - selectionBar.anchors.bottomMargin
model: {
switch (selectionBar.currentIndex) {
var modelId = UtilsAdapter.isRTL ? 4 - selectionBar.currentIndex : selectionBar.currentIndex
switch (modelId) {
case 0:
return keyboardGeneralShortcutsModel;
case 1:
......@@ -346,13 +348,17 @@ Window {
}
Repeater {
model: ["1", "2", "3", "4", "5"]
model: UtilsAdapter.isRTL ? ["5", "4", "3", "2", "1"] : ["1", "2", "3", "4", "5"]
KeyboardShortcutTabButton {
currentIndex: selectionBar.currentIndex
text: modelData
}
}
Component.onCompleted: {
setCurrentIndex(UtilsAdapter.isRTL ? 4 : 0);
}
}
}
}
......@@ -102,6 +102,8 @@ SettingsPageBase {
Layout.fillWidth: true
Layout.minimumHeight: JamiTheme.preferredFieldHeight
layoutDirection: UtilsAdapter.isRTL ? Qt.RightToLeft : Qt.LeftToRight
Text {
Layout.fillWidth: true
Layout.fillHeight: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment