Skip to content
Snippets Groups Projects
Commit bad5698e authored by Fadi Shehadeh's avatar Fadi Shehadeh Committed by François-Simon Fauteux-Chapleau
Browse files

RTL: JamiIdentifier layout fix

Adapted radius for RTL.

GitLab: #1953
Change-Id: I732cd33b403fea1f115527db19faffe131b259eb
parent 7f0a94dd
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,6 @@ Item { ...@@ -45,7 +45,6 @@ Item {
if (usernameTextEdit.editMode) { if (usernameTextEdit.editMode) {
usernameTextEdit.editMode = false; usernameTextEdit.editMode = false;
} }
} }
} }
...@@ -57,10 +56,16 @@ Item { ...@@ -57,10 +56,16 @@ Item {
RoundedBorderRectangle { RoundedBorderRectangle {
id: leftRect id: leftRect
fillColor: JamiTheme.jamiIdBackgroundColor fillColor: JamiTheme.jamiIdBackgroundColor
Layout.preferredWidth: usernameTextEdit.visible ? childrenRect.width + JamiTheme.pushButtonMargins : childrenRect.width Layout.preferredWidth: usernameTextEdit.visible ? childrenRect.width + JamiTheme.pushButtonMargins : childrenRect.width
Layout.preferredHeight: childrenRect.height Layout.preferredHeight: childrenRect.height
radius: { radius: isRTL ? {
"tl": 0,
"tr": 5,
"br": 5,
"bl": 0
} : {
"tl": 5, "tl": 5,
"tr": 0, "tr": 0,
"br": 0, "br": 0,
...@@ -132,7 +137,12 @@ Item { ...@@ -132,7 +137,12 @@ Item {
Layout.preferredWidth: childrenRect.width + 2 * JamiTheme.pushButtonMargins Layout.preferredWidth: childrenRect.width + 2 * JamiTheme.pushButtonMargins
Layout.preferredHeight: leftRect.height Layout.preferredHeight: leftRect.height
radius: { radius: isRTL ? {
"tl": 5,
"tr": 0,
"br": 0,
"bl": 5
} : {
"tl": 0, "tl": 0,
"tr": 5, "tr": 5,
"br": 5, "br": 5,
...@@ -228,10 +238,14 @@ Item { ...@@ -228,10 +238,14 @@ Item {
toolTipText: JamiStrings.identifierURI toolTipText: JamiStrings.identifierURI
onClicked: { onClicked: {
if (clicked) { if (clicked) {
usernameTextEdit.staticText = Qt.binding(function() {return CurrentAccount.uri} ); usernameTextEdit.staticText = Qt.binding(function () {
return CurrentAccount.uri;
});
btnId.toolTipText = JamiStrings.identifierRegisterName; btnId.toolTipText = JamiStrings.identifierRegisterName;
} else { } else {
usernameTextEdit.staticText = Qt.binding(function() {return CurrentAccount.registeredName} ); usernameTextEdit.staticText = Qt.binding(function () {
return CurrentAccount.registeredName;
});
btnId.toolTipText = JamiStrings.identifierURI; btnId.toolTipText = JamiStrings.identifierURI;
} }
clicked = !clicked; clicked = !clicked;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment