From 0eeb7ffbc9940a4d4a96fb019decbdec8e5150e9 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Tue, 15 Nov 2022 01:12:07 +0100 Subject: [PATCH] Fix eliding matrix id and display name in account switcher --- src/qml/Component/UserInfo.qml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qml/Component/UserInfo.qml b/src/qml/Component/UserInfo.qml index 3c5f967bb..36c114b03 100644 --- a/src/qml/Component/UserInfo.qml +++ b/src/qml/Component/UserInfo.qml @@ -148,12 +148,14 @@ QQC2.ToolBar { } } ColumnLayout { + Layout.fillWidth: true spacing: 0 QQC2.Label { id: displayNameLabel text: Controller.activeConnection.localUser.displayName textFormat: Text.PlainText elide: Text.ElideRight + Layout.fillWidth: true } QQC2.Label { text: (Controller.activeConnection.localUser.accountLabel.length > 0 ? (Controller.activeConnection.localUser.accountLabel + " ") : "") + Controller.activeConnection.localUser.id @@ -161,11 +163,9 @@ QQC2.ToolBar { opacity: 0.7 textFormat: Text.PlainText elide: Text.ElideRight + Layout.fillWidth: true } } - Item { - Layout.fillWidth: true - } QQC2.ToolButton { icon.name: "system-switch-user" onClicked: { @@ -177,6 +177,8 @@ QQC2.ToolBar { QQC2.ToolTip.text: text QQC2.ToolTip.visible: hovered QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay + Layout.minimumWidth: Layout.preferredWidth + Layout.alignment: Qt.AlignRight } QQC2.ToolButton { icon.name: "list-add" @@ -186,6 +188,8 @@ QQC2.ToolBar { QQC2.ToolTip.text: text QQC2.ToolTip.visible: hovered QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay + Layout.minimumWidth: Layout.preferredWidth + Layout.alignment: Qt.AlignRight visible: false } QQC2.ToolButton { @@ -193,6 +197,8 @@ QQC2.ToolBar { onClicked: pageStack.pushDialogLayer("qrc:/SettingsPage.qml", {}, { title: i18n("Configure") }) text: i18n("Open Settings") display: QQC2.AbstractButton.IconOnly + Layout.minimumWidth: Layout.preferredWidth + Layout.alignment: Qt.AlignRight QQC2.ToolTip { text: parent.text }