diff options
author | Juho Annunen <juho.annunen@qt.io> | 2018-08-20 12:25:40 +0300 |
---|---|---|
committer | Juho Annunen <juho.annunen@qt.io> | 2018-08-29 07:30:00 +0000 |
commit | 09aa32dd522176a9b9762e4d85b3e8c66d4d6be2 (patch) | |
tree | 06600dddeb2598e2745f21d52aad73b4ea456990 /basicsuite/ebike-ui/IconifiedTabButton.qml | |
parent | 1ff81b46a37550bb4430cc032b6d5504525af53f (diff) |
Fix some major scaling & font issues on ebike-demo
Task-number: QTBUG-69840
Change-Id: If519ae62a0a73c8dbf2f6f7b9f681bdfdb8b28a0
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'basicsuite/ebike-ui/IconifiedTabButton.qml')
-rw-r--r-- | basicsuite/ebike-ui/IconifiedTabButton.qml | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/basicsuite/ebike-ui/IconifiedTabButton.qml b/basicsuite/ebike-ui/IconifiedTabButton.qml index 572ce51..4762d94 100644 --- a/basicsuite/ebike-ui/IconifiedTabButton.qml +++ b/basicsuite/ebike-ui/IconifiedTabButton.qml @@ -43,27 +43,24 @@ TabButton { property string selectedIcon property var bar - contentItem: Image { - width: UILayout.tabButtonIconWidth - height: UILayout.tabButtonIconHeight - source: bar.currentItem === parent ? selectedIcon : deselectedIcon - fillMode: Image.Pad - anchors { - top: parent.top - topMargin: UILayout.tabButtonTopMargin - horizontalCenter: parent.horizontalCenter - } - } - background: Rectangle { color: Colors.tabBackground - height: parent.height + + Image { + height: parent.height + width: height + source: bar.currentItem === parent.parent ? selectedIcon : deselectedIcon + fillMode: Image.PreserveAspectFit + anchors.centerIn: parent + + } Rectangle { visible: bar.currentItem === parent.parent width: parent.width height: 2 anchors.bottom: parent.bottom + anchors.bottomMargin: height color: Colors.activeTabBorder } } |