chore: don't redefine theme palette category QtObjects

just assign to them, no need to duplicate the properties
This commit is contained in:
Lukáš Tinkl 2023-01-18 10:31:34 +01:00 committed by Lukáš Tinkl
parent 6f7c1c6b6a
commit 3d2537d4ca
4 changed files with 42 additions and 39 deletions

View File

@ -1,10 +1,10 @@
pragma Singleton
import QtQuick 2.13
import QtQml 2.14
QtObject {
property var colors: {
readonly property var colors: {
'black': '#000000',
'white': '#FFFFFF',
@ -69,4 +69,3 @@ QtObject {
'lightPattensBlue': '#D7DEE4',
}
}

View File

@ -87,83 +87,82 @@ ThemePalette {
"#000086", "#9B81FF", "#3FAEF9", "#9A6600", "#00FFFF", "#008694",
"#C2FFFF", "#00F0B6"]
property QtObject statusAppLayout: QtObject {
statusAppLayout: QtObject {
property color backgroundColor: baseColor3
property color rightPanelBackgroundColor: baseColor3
}
property QtObject statusAppNavBar: QtObject {
statusAppNavBar: QtObject {
property color backgroundColor: baseColor5
}
property QtObject statusToastMessage: QtObject {
statusToastMessage: QtObject {
property color backgroundColor: baseColor3
}
property QtObject statusListItem: QtObject {
statusListItem: QtObject {
property color backgroundColor: baseColor3
property color secondaryHoverBackgroundColor: primaryColor3
}
property QtObject statusChatListItem: QtObject {
statusChatListItem: QtObject {
property color hoverBackgroundColor: directColor8
property color selectedBackgroundColor: directColor7
}
property QtObject statusChatListCategoryItem: QtObject {
statusChatListCategoryItem: QtObject {
property color buttonHoverBackgroundColor: directColor7
}
property QtObject statusNavigationListItem: QtObject {
statusNavigationListItem: QtObject {
property color hoverBackgroundColor: directColor8
property color selectedBackgroundColor: directColor7
}
property QtObject statusBadge: QtObject {
statusBadge: QtObject {
property color foregroundColor: baseColor3
property color borderColor: baseColor5
property color hoverBorderColor: "#353A4D"
}
property QtObject statusChatInfoButton: QtObject {
statusChatInfoButton: QtObject {
property color backgroundColor: baseColor3
}
property QtObject statusMenu: QtObject {
statusMenu: QtObject {
property color backgroundColor: baseColor2
property color hoverBackgroundColor: directColor7
property color separatorColor: directColor7
}
property QtObject statusModal: QtObject {
statusModal: QtObject {
property color backgroundColor: baseColor3
}
property QtObject statusRoundedImage: QtObject {
statusRoundedImage: QtObject {
property color backgroundColor: baseColor3
}
property QtObject statusChatInput: QtObject {
statusChatInput: QtObject {
property color secondaryBackgroundColor: "#414141"
}
property QtObject statusSwitchTab: QtObject {
statusSwitchTab: QtObject {
property color buttonBackgroundColor: primaryColor1
property color barBackgroundColor: primaryColor3
property color selectedTextColor: white
property color textColor: primaryColor1
}
property QtObject statusSelect: QtObject {
statusSelect: QtObject {
property color menuItemBackgroundColor: baseColor2
property color menuItemHoverBackgroundColor: directColor7
}
property QtObject statusMessage: QtObject {
statusMessage: QtObject {
property color emojiReactionBackground: "#2d2823"
property color emojiReactionBackgroundHovered: "#3a3632"
property color emojiReactionActiveBackground: getColor('blue')
property color emojiReactionActiveBackgroundHovered: Qt.darker(emojiReactionActiveBackground, 1.1)
}
}

View File

@ -85,83 +85,82 @@ ThemePalette {
"#000086", "#9B81FF", "#3FAEF9", "#9A6600", "#00FFFF", "#008694",
"#C2FFFF", "#00F0B6"]
property QtObject statusAppLayout: QtObject {
statusAppLayout: QtObject {
property color backgroundColor: white
property color rightPanelBackgroundColor: white
}
property QtObject statusAppNavBar: QtObject {
statusAppNavBar: QtObject {
property color backgroundColor: baseColor2
}
property QtObject statusToastMessage: QtObject {
statusToastMessage: QtObject {
property color backgroundColor: white
}
property QtObject statusListItem: QtObject {
statusListItem: QtObject {
property color backgroundColor: white
property color secondaryHoverBackgroundColor: getColor('blue6')
}
property QtObject statusChatListItem: QtObject {
statusChatListItem: QtObject {
property color hoverBackgroundColor: baseColor2
property color selectedBackgroundColor: baseColor3
}
property QtObject statusChatListCategoryItem: QtObject {
statusChatListCategoryItem: QtObject {
property color buttonHoverBackgroundColor: directColor8
}
property QtObject statusNavigationListItem: QtObject {
statusNavigationListItem: QtObject {
property color hoverBackgroundColor: baseColor2
property color selectedBackgroundColor: baseColor3
}
property QtObject statusBadge: QtObject {
statusBadge: QtObject {
property color foregroundColor: white
property color borderColor: baseColor4
property color hoverBorderColor: "#DDE3F3"
}
property QtObject statusChatInfoButton: QtObject {
statusChatInfoButton: QtObject {
property color backgroundColor: white
}
property QtObject statusMenu: QtObject {
statusMenu: QtObject {
property color backgroundColor: white
property color hoverBackgroundColor: baseColor2
property color separatorColor: baseColor2
}
property QtObject statusModal: QtObject {
statusModal: QtObject {
property color backgroundColor: white
}
property QtObject statusRoundedImage: QtObject {
statusRoundedImage: QtObject {
property color backgroundColor: white
}
property QtObject statusChatInput: QtObject {
statusChatInput: QtObject {
property color secondaryBackgroundColor: "#E2E6E8"
}
property QtObject statusSwitchTab: QtObject {
statusSwitchTab: QtObject {
property color buttonBackgroundColor: primaryColor1
property color barBackgroundColor: primaryColor3
property color selectedTextColor: white
property color textColor: primaryColor1
}
property QtObject statusSelect: QtObject {
statusSelect: QtObject {
property color menuItemBackgroundColor: white
property color menuItemHoverBackgroundColor: baseColor2
}
property QtObject statusMessage: QtObject {
statusMessage: QtObject {
property color emojiReactionBackground: "#e2e6e9"
property color emojiReactionBackgroundHovered: "#d7dadd"
property color emojiReactionActiveBackground: getColor('blue')
property color emojiReactionActiveBackgroundHovered: Qt.darker(emojiReactionActiveBackground, 1.1)
}
}

View File

@ -246,6 +246,13 @@ QtObject {
property color menuItemHoeverBackgroundColor
}
property QtObject statusMessage: QtObject {
property color emojiReactionBackground
property color emojiReactionBackgroundHovered
property color emojiReactionActiveBackground
property color emojiReactionActiveBackgroundHovered
}
function alphaColor(color, alpha) {
let actualColor = Qt.darker(color, 1)
actualColor.a = alpha
@ -257,4 +264,3 @@ QtObject {
: StatusColors.colors[name]
}
}