Skip to content

Commit 2518f40

Browse files
committed
Use dedicated symbolic color for errors
1 parent 0fdde1e commit 2518f40

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

src/colorscheme.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ wxColour ColorScheme::DoGet(Color color, Mode mode)
102102
case Color::ItemFuzzy:
103103
return mode == Dark ? sRGB(253, 178, 72) : sRGB(230, 134, 0);
104104
case Color::ItemError:
105+
case Color::ErrorText:
105106
return sRGB(225, 77, 49);
106107
case Color::ItemContextFg:
107108
return mode == Dark ? sRGB(180, 222, 254) : sRGB(70, 109, 137);

src/colorscheme.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ enum class Color : size_t
3737
{
3838
SecondaryLabel,
3939

40+
ErrorText,
41+
4042
ItemID,
4143
ItemFuzzy,
4244
ItemError,

src/customcontrols.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include "customcontrols.h"
2727

28+
#include "colorscheme.h"
2829
#include "concurrency.h"
2930
#include "errors.h"
3031
#include "hidpi.h"
@@ -436,7 +437,7 @@ void ActivityIndicator::StopWithError(const wxString& msg)
436437
m_running = false;
437438

438439
m_spinner->Stop();
439-
m_label->SetForegroundColour(*wxRED);
440+
m_label->SetForegroundColour(ColorScheme::Get(Color::ErrorText));
440441
m_label->SetLabel(msg);
441442
m_label->SetToolTip(msg);
442443

src/propertiesdlg.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
#include <memory>
5757

5858
#include "propertiesdlg.h"
59+
60+
#include "colorscheme.h"
5961
#include "hidpi.h"
6062
#include "language.h"
6163
#include "str_helpers.h"
@@ -880,7 +882,7 @@ void PropertiesDialog::DisableSourcesControls()
880882

881883
auto label = XRCCTRL(*this, "sources_path_label", wxStaticText);
882884
label->SetLabel(_("Please save the file first. This section cannot be edited until then."));
883-
label->SetForegroundColour(*wxRED);
885+
label->SetForegroundColour(ColorScheme::Get(Color::ErrorText));
884886
}
885887

886888

0 commit comments

Comments
 (0)