From 8dde83495f68124fcbaf26d199c2fcd709240fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Wed, 3 Jun 2020 15:19:57 +0200 Subject: [PATCH] Use dedicated symbolic color for errors --- src/colorscheme.cpp | 1 + src/colorscheme.h | 2 ++ src/customcontrols.cpp | 3 ++- src/propertiesdlg.cpp | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/colorscheme.cpp b/src/colorscheme.cpp index 944fb995cf..755994c2fa 100644 --- a/src/colorscheme.cpp +++ b/src/colorscheme.cpp @@ -102,6 +102,7 @@ wxColour ColorScheme::DoGet(Color color, Mode mode) case Color::ItemFuzzy: return mode == Dark ? sRGB(253, 178, 72) : sRGB(230, 134, 0); case Color::ItemError: + case Color::ErrorText: return sRGB(225, 77, 49); case Color::ItemContextFg: return mode == Dark ? sRGB(180, 222, 254) : sRGB(70, 109, 137); diff --git a/src/colorscheme.h b/src/colorscheme.h index 7f83ef664d..d7125ad384 100644 --- a/src/colorscheme.h +++ b/src/colorscheme.h @@ -37,6 +37,8 @@ enum class Color : size_t { SecondaryLabel, + ErrorText, + ItemID, ItemFuzzy, ItemError, diff --git a/src/customcontrols.cpp b/src/customcontrols.cpp index 8e7528d51d..04b0a32183 100644 --- a/src/customcontrols.cpp +++ b/src/customcontrols.cpp @@ -25,6 +25,7 @@ #include "customcontrols.h" +#include "colorscheme.h" #include "concurrency.h" #include "errors.h" #include "hidpi.h" @@ -436,7 +437,7 @@ void ActivityIndicator::StopWithError(const wxString& msg) m_running = false; m_spinner->Stop(); - m_label->SetForegroundColour(*wxRED); + m_label->SetForegroundColour(ColorScheme::Get(Color::ErrorText)); m_label->SetLabel(msg); m_label->SetToolTip(msg); diff --git a/src/propertiesdlg.cpp b/src/propertiesdlg.cpp index acbd691fa2..9fcb3da900 100644 --- a/src/propertiesdlg.cpp +++ b/src/propertiesdlg.cpp @@ -880,7 +880,7 @@ void PropertiesDialog::DisableSourcesControls() auto label = XRCCTRL(*this, "sources_path_label", wxStaticText); label->SetLabel(_("Please save the file first. This section cannot be edited until then.")); - label->SetForegroundColour(*wxRED); + label->SetForegroundColour(ColorScheme::Get(Color::ErrorText)); }