feat(appMain): Add warning colors. Use warning color for story node banner

This commit is contained in:
MishkaRogachev 2023-01-18 20:37:36 +04:00 committed by Mikhail Rogachev
parent b474ef0024
commit 5ff4c35bf0
6 changed files with 18 additions and 2 deletions

View File

@ -50,6 +50,8 @@ QtObject {
'orange3': '#FFA67B',
'orange4': '#FE8F59',
'warning_orange': '#F6793C',
'purple': '#887AF9',
'red': '#FF2D55',

View File

@ -20,6 +20,10 @@ ThemePalette {
dangerColor2: getColor('red3', 0.3)
dangerColor3: getColor('red3', 0.2)
warningColor1: getColor('warning_orange')
warningColor2: getColor('warning_orange', 0.2)
warningColor3: getColor('warning_orange', 0.1)
successColor1: getColor('green3')
successColor2: getColor('green3', 0.2)
successColor3: getColor('green3', 0.3)

View File

@ -18,6 +18,10 @@ ThemePalette {
dangerColor2: getColor('red', 0.2)
dangerColor3: getColor('red', 0.1)
warningColor1: getColor('warning_orange')
warningColor2: getColor('warning_orange', 0.2)
warningColor3: getColor('warning_orange', 0.1)
successColor1: getColor('green')
successColor2: getColor('green', 0.1)
successColor3: getColor('green', 0.2)

View File

@ -125,6 +125,10 @@ QtObject {
property color dangerColor2
property color dangerColor3
property color warningColor1
property color warningColor2
property color warningColor3
property color successColor1
property color successColor2
property color successColor3

View File

@ -728,8 +728,8 @@ Item {
ModuleWarning {
id: mailserverConnectionBanner
type: ModuleWarning.Danger
text: qsTr("Can not connect to mailserver. Retrying automatically")
type: ModuleWarning.Warning
text: qsTr("Can not connect to store node. Retrying automatically")
onCloseClicked: hide()
Layout.fillWidth: true
}

View File

@ -13,6 +13,7 @@ Item {
enum Type {
Danger,
Warning,
Success
}
@ -123,6 +124,7 @@ Item {
switch (root.type) {
case ModuleWarning.Danger: return Theme.palette.dangerColor1
case ModuleWarning.Success: return Theme.palette.successColor1
case ModuleWarning.Warning: return Theme.palette.warningColor1
default: return Theme.palette.baseColor1
}
}