Tabs theme, even/odd color, no gaps between tabs

This commit is contained in:
miruka
2019-11-07 11:23:47 -04:00
parent 8c111904a5
commit 8742b7803c
4 changed files with 27 additions and 3 deletions

7
src/qml/Base/HTabBar.qml Normal file
View File

@@ -0,0 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
TabBar {
spacing: 0
position: TabBar.Header
}

View File

@@ -32,7 +32,10 @@ TabButton {
readonly property alias iconItem: contentItem.icon
readonly property alias label: contentItem.label
property color backgroundColor: theme.controls.tab.background
property color backgroundColor:
TabBar.index % 2 == 0 ?
theme.controls.tab.background : theme.controls.tab.alternateBackground
property bool loading: false
property HToolTip toolTip: HToolTip {

View File

@@ -2,6 +2,7 @@ import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import "../../Base"
import "../../utils.js" as Utils
HPage {
id: addChatPage
@@ -17,9 +18,8 @@ HPage {
Layout.maximumWidth:
Math.max(tabBar.contentWidth, swipeView.contentWidth)
TabBar {
HTabBar {
id: tabBar
position: TabBar.Header
currentIndex: 2
Layout.fillWidth: true