From adbae927307b004ff2edaee11e4a8afe10c81b75 Mon Sep 17 00:00:00 2001 From: mishkarogachev Date: Thu, 5 May 2022 13:24:48 +0300 Subject: [PATCH] fix(StatusSwitchTabBar): Update and unify colors of tabBar --- ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabBar.qml | 2 +- ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml | 6 ++++-- ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml | 5 ++++- ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml | 5 ++++- ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml | 7 +++++-- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabBar.qml b/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabBar.qml index d733b5850b..f58b01fab5 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabBar.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabBar.qml @@ -8,7 +8,7 @@ TabBar { background: Rectangle { implicitHeight: 36 - color: Theme.palette.directColor7 + color: Theme.palette.statusSwitchTab.barBackgroundColor radius: 8 } } diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml b/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml index 72d15e59c5..dfc215a6de 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusSwitchTabButton.qml @@ -22,7 +22,9 @@ TabButton { StatusBaseText { id: label text: statusSwitchTabButton.text - color: Theme.palette.primaryColor1 + color: statusSwitchTabButton.checked ? + Theme.palette.statusSwitchTab.selectedTextColor : + Theme.palette.statusSwitchTab.textColor font.weight: Font.Medium font.pixelSize: 15 horizontalAlignment: Text.AlignHCenter @@ -36,7 +38,7 @@ TabButton { implicitHeight: 36 implicitWidth: 148 color: statusSwitchTabButton.checked ? - Theme.palette.statusSwitchTab.backgroundColor : + Theme.palette.statusSwitchTab.buttonBackgroundColor : "transparent" radius: 8 layer.enabled: true diff --git a/ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml b/ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml index eaf697c159..ff48d1115b 100644 --- a/ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml +++ b/ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml @@ -230,7 +230,10 @@ ThemePalette { } property QtObject statusSwitchTab: QtObject { - property color backgroundColor: baseColor3 + property color buttonBackgroundColor: primaryColor1 + property color barBackgroundColor: primaryColor3 + property color selectedTextColor: white + property color textColor: primaryColor1 } property QtObject statusSelect: QtObject { diff --git a/ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml b/ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml index be645942ea..7a4e0a9549 100644 --- a/ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml +++ b/ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml @@ -228,7 +228,10 @@ ThemePalette { } property QtObject statusSwitchTab: QtObject { - property color backgroundColor: white + property color buttonBackgroundColor: primaryColor1 + property color barBackgroundColor: primaryColor3 + property color selectedTextColor: white + property color textColor: primaryColor1 } property QtObject statusSelect: QtObject { diff --git a/ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml b/ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml index a7f6abb91f..262a62e53e 100644 --- a/ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml +++ b/ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml @@ -1,7 +1,7 @@ import QtQuick 2.13 QtObject { - + id: theme property string name @@ -156,7 +156,10 @@ QtObject { } property QtObject statusSwitchTab: QtObject { - property color backgroundColor + property color buttonBackgroundColor + property color barBackgroundColor + property color selectedTextColor + property color textColor } property QtObject statusSelect: QtObject {