From c545b2e480d29d4a2149ca4cbadd84b6d23542e8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 26 Jul 2017 10:57:45 -0600 Subject: The account switcher is a control too --- framework/qml/InlineAccountSwitcher.qml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'framework/qml/InlineAccountSwitcher.qml') diff --git a/framework/qml/InlineAccountSwitcher.qml b/framework/qml/InlineAccountSwitcher.qml index 67d88637..ae1d0dc7 100644 --- a/framework/qml/InlineAccountSwitcher.qml +++ b/framework/qml/InlineAccountSwitcher.qml @@ -55,32 +55,22 @@ FocusScope { height: Kube.Units.gridUnit Layout.fillHeight: isCurrent - Rectangle { + Kube.TextButton { id: accountLabel - + anchors.top: parent.top + anchors.left: parent.left height: Kube.Units.gridUnit width: parent.width - color: Kube.Colors.textColor + textColor: Kube.Colors.highlightedTextColor activeFocusOnTab: !isCurrent - Keys.onReturnPressed: { - root.currentAccount = model.accountId - } + onClicked: root.currentAccount = model.accountId + text: model.name + font.weight: Font.Bold + font.family: Kube.Font.fontFamily + horizontalAlignment: Text.AlignHLeft + padding: 0 - MouseArea { - anchors.fill: parent - onClicked: { - root.currentAccount = model.accountId - } - } - - Kube.Label{ - anchors.verticalCenter: parent.verticalCenter - text: model.name - font.weight: Font.Bold - color: Kube.Colors.highlightedTextColor - font.underline: accountLabel.activeFocus - } } Kube.FolderListView { -- cgit v1.2.3