Skip to content

Commit

Permalink
Use dedicated symbolic color for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vslavik committed Jun 3, 2020
1 parent 0fdde1e commit 2518f40
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/colorscheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/colorscheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ enum class Color : size_t
{
SecondaryLabel,

ErrorText,

ItemID,
ItemFuzzy,
ItemError,
Expand Down
3 changes: 2 additions & 1 deletion src/customcontrols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "customcontrols.h"

#include "colorscheme.h"
#include "concurrency.h"
#include "errors.h"
#include "hidpi.h"
Expand Down Expand Up @@ -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);

Expand Down
4 changes: 3 additions & 1 deletion src/propertiesdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
#include <memory>

#include "propertiesdlg.h"

#include "colorscheme.h"
#include "hidpi.h"
#include "language.h"
#include "str_helpers.h"
Expand Down Expand Up @@ -880,7 +882,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));
}


Expand Down

0 comments on commit 2518f40

Please sign in to comment.