mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
RTL: fix shortcut keyboard and download folder setting
GitLab: #1133 Change-Id: If71e23c23974d74345d68469606cb3cc25e78b30
This commit is contained in:
parent
afb9211e7a
commit
4769a78c50
3 changed files with 16 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue