Tabs theme, even/odd color, no gaps between tabs
This commit is contained in:
parent
8c111904a5
commit
8742b7803c
7
src/qml/Base/HTabBar.qml
Normal file
7
src/qml/Base/HTabBar.qml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import QtQuick 2.12
|
||||||
|
import QtQuick.Controls 2.12
|
||||||
|
|
||||||
|
TabBar {
|
||||||
|
spacing: 0
|
||||||
|
position: TabBar.Header
|
||||||
|
}
|
|
@ -32,7 +32,10 @@ TabButton {
|
||||||
readonly property alias iconItem: contentItem.icon
|
readonly property alias iconItem: contentItem.icon
|
||||||
readonly property alias label: contentItem.label
|
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 bool loading: false
|
||||||
|
|
||||||
property HToolTip toolTip: HToolTip {
|
property HToolTip toolTip: HToolTip {
|
||||||
|
|
|
@ -2,6 +2,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import "../../Base"
|
import "../../Base"
|
||||||
|
import "../../utils.js" as Utils
|
||||||
|
|
||||||
HPage {
|
HPage {
|
||||||
id: addChatPage
|
id: addChatPage
|
||||||
|
@ -17,9 +18,8 @@ HPage {
|
||||||
Layout.maximumWidth:
|
Layout.maximumWidth:
|
||||||
Math.max(tabBar.contentWidth, swipeView.contentWidth)
|
Math.max(tabBar.contentWidth, swipeView.contentWidth)
|
||||||
|
|
||||||
TabBar {
|
HTabBar {
|
||||||
id: tabBar
|
id: tabBar
|
||||||
position: TabBar.Header
|
|
||||||
currentIndex: 2
|
currentIndex: 2
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -116,6 +116,20 @@ controls:
|
||||||
color pressedOverlay: hsluv(0, 0, 50, 0.5)
|
color pressedOverlay: hsluv(0, 0, 50, 0.5)
|
||||||
color checkedOverlay: colors.accentBackground
|
color checkedOverlay: colors.accentBackground
|
||||||
|
|
||||||
|
tab:
|
||||||
|
color text: controls.button.text
|
||||||
|
color background: controls.button.background
|
||||||
|
color alternateBackground: hsluv(
|
||||||
|
colors.hue,
|
||||||
|
colors.bgSaturation * 1.25,
|
||||||
|
colors.intensity * 4,
|
||||||
|
Math.max(0.6, colors.opacity)
|
||||||
|
)
|
||||||
|
|
||||||
|
color hoveredOverlay: controls.button.hoveredOverlay
|
||||||
|
color pressedOverlay: controls.button.pressedOverlay
|
||||||
|
color checkedOverlay: controls.button.checkedOverlay
|
||||||
|
|
||||||
menu:
|
menu:
|
||||||
color background: controls.button.background
|
color background: controls.button.background
|
||||||
color border: "black"
|
color border: "black"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user