diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-02-07 01:45:58 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-02-07 12:21:16 +0000 |
commit | f6d7be8082098f1b8a1e2decdeec89e17adb55d0 (patch) | |
tree | 4f9395f0b774a05b29a854fcaf8cf6c12d29ac21 /src/imports | |
parent | 4d0294352f975c3916dfbba48f21e5b76da432c0 (diff) |
Material: increase the height of tabs
The Material design specifies 48dp as a height for tabs, which is
also the minimum touch target size.
Change-Id: I7c67e3e0aec92d197df14fd60bbd1ebcd55131f6
Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/controls/material/TabBar.qml | 8 | ||||
-rw-r--r-- | src/imports/controls/material/TabButton.qml | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/imports/controls/material/TabBar.qml b/src/imports/controls/material/TabBar.qml index 4aaef818..dbc62512 100644 --- a/src/imports/controls/material/TabBar.qml +++ b/src/imports/controls/material/TabBar.qml @@ -41,15 +41,17 @@ import Qt.labs.controls.material 1.0 T.TabBar { id: control - implicitWidth: Math.max(26, contentItem.implicitWidth + leftPadding + rightPadding) - implicitHeight: Math.max(26, contentItem.implicitHeight + topPadding + bottomPadding) + implicitWidth: Math.max(background ? background.implicitWidth : 0, + contentItem.implicitWidth + leftPadding + rightPadding) + implicitHeight: Math.max(background ? background.implicitHeight : 0, + contentItem.implicitHeight + topPadding + bottomPadding) spacing: 1 //! [contentItem] contentItem: ListView { implicitWidth: contentWidth - implicitHeight: contentHeight + implicitHeight: 48 model: control.contentModel currentIndex: control.currentIndex diff --git a/src/imports/controls/material/TabButton.qml b/src/imports/controls/material/TabButton.qml index 22dcd7a0..6f0f70d4 100644 --- a/src/imports/controls/material/TabButton.qml +++ b/src/imports/controls/material/TabButton.qml @@ -67,8 +67,7 @@ T.TabButton { //! [background] background: Item { - height: parent.height - 1 - implicitHeight: 26 + implicitHeight: 48 } //! [background] } |