summaryrefslogtreecommitdiffstats
path: root/basicsuite/ebike-ui/IconifiedTabButton.qml
diff options
context:
space:
mode:
authorJuho Annunen <juho.annunen@qt.io>2018-08-20 12:25:40 +0300
committerJuho Annunen <juho.annunen@qt.io>2018-08-29 07:30:00 +0000
commit09aa32dd522176a9b9762e4d85b3e8c66d4d6be2 (patch)
tree06600dddeb2598e2745f21d52aad73b4ea456990 /basicsuite/ebike-ui/IconifiedTabButton.qml
parent1ff81b46a37550bb4430cc032b6d5504525af53f (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.qml23
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
}
}