mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2025-12-29 12:36:34 +08:00
settings: make user registered name and id elide correctly
Change-Id: I04250ff2fc61015e1e36ac2d728a69914958122c
This commit is contained in:
committed by
Andreas Traczyk
parent
a79bf21a27
commit
e5bafb5472
@@ -56,13 +56,17 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Identity
|
// Identity
|
||||||
RowLayout {
|
Row {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
|
spacing: width - idLabel.width - currentRingID.width
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: idLabel
|
id: idLabel
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
text: JamiStrings.identifier
|
text: JamiStrings.identifier
|
||||||
font.pointSize: JamiTheme.settingsFontSize
|
font.pointSize: JamiTheme.settingsFontSize
|
||||||
font.kerning: true
|
font.kerning: true
|
||||||
@@ -77,12 +81,15 @@ ColumnLayout {
|
|||||||
property var backgroundColor: "transparent"
|
property var backgroundColor: "transparent"
|
||||||
property var borderColor: "transparent"
|
property var borderColor: "transparent"
|
||||||
|
|
||||||
Layout.fillWidth: true
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
height: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
font.pointSize: JamiTheme.textFontSize
|
||||||
font.kerning: true
|
font.kerning: true
|
||||||
font.bold: true
|
font.bold: true
|
||||||
|
|
||||||
|
padding: 0
|
||||||
readOnly: true
|
readOnly: true
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
|
||||||
@@ -102,35 +109,49 @@ ColumnLayout {
|
|||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: currentRingIDText
|
id: currentRingIDText
|
||||||
|
|
||||||
|
font: currentRingID.font
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
elideWidth: root.width - idLabel.width -JamiTheme.preferredMarginSize*4
|
elideWidth: root.width - idLabel.width -
|
||||||
|
JamiTheme.preferredMarginSize * 4
|
||||||
|
|
||||||
text: SettingsAdapter.getCurrentAccount_Profile_Info_Uri()
|
text: SettingsAdapter.getCurrentAccount_Profile_Info_Uri()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
Row {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
ElidedTextLabel {
|
spacing: width - lblRegisteredName.width - currentRegisteredID.width
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
eText: JamiStrings.username
|
Label {
|
||||||
fontSize: JamiTheme.settingsFontSize
|
id: lblRegisteredName
|
||||||
maxWidth: width
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
text: JamiStrings.username
|
||||||
|
font.pointSize: JamiTheme.settingsFontSize
|
||||||
|
font.kerning: true
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
UsernameLineEdit {
|
UsernameLineEdit {
|
||||||
id: currentRegisteredID
|
id: currentRegisteredID
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: itemWidth
|
|
||||||
implicitWidth: itemWidth
|
|
||||||
wrapMode: Text.NoWrap
|
|
||||||
|
|
||||||
|
height: JamiTheme.preferredFieldHeight
|
||||||
|
width: {
|
||||||
|
var maximumWidth = parent.width - lblRegisteredName.width
|
||||||
|
- JamiTheme.preferredMarginSize
|
||||||
|
return fieldLayoutWidth < maximumWidth ?
|
||||||
|
fieldLayoutWidth : maximumWidth
|
||||||
|
}
|
||||||
|
|
||||||
|
wrapMode: Text.NoWrap
|
||||||
placeholderText: registeredIdNeedsSet ?
|
placeholderText: registeredIdNeedsSet ?
|
||||||
JamiStrings.registerUsername : ""
|
JamiStrings.registerUsername : ""
|
||||||
text: {
|
text: {
|
||||||
|
|||||||
Reference in New Issue
Block a user