Skip to content

Commit

Permalink
Tweak console text colours for better visibility
Browse files Browse the repository at this point in the history
Avoid using forced black for regular text, since this is unreadable in dark
themes. Use wxNullColour for regular text, which uses the appropriate theme
colour, and a slightly dark orange for warning text, which appears to be
visible with both a light and a dark background.
  • Loading branch information
Matthew Mott committed Jun 2, 2021
1 parent e3238ac commit 7cd838c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/wxutil/ConsoleView.cpp
Expand Up @@ -10,8 +10,8 @@ namespace wxutil
ConsoleView::ConsoleView(wxWindow* parent) :
wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH2|wxTE_READONLY),
_errorAttr(*wxRED),
_warningAttr(wxColour(128, 128, 0)),
_standardAttr(*wxBLACK)
_warningAttr(wxColour(255, 96, 0)),
_standardAttr(wxNullColour)
{
_lineBuffer.reserve(512);
}
Expand Down Expand Up @@ -54,7 +54,7 @@ void ConsoleView::flushLine()

void ConsoleView::onIdle()
{
// Idle events occur in the main thread - prevent interrupting
// Idle events occur in the main thread - prevent interrupting
// threads in the middle of a line
std::lock_guard<std::mutex> idleLock(GlobalRadiantCore().getLogWriter().getStreamLock());

Expand Down Expand Up @@ -87,7 +87,7 @@ void ConsoleView::onIdle()
// Insert at the end of the text buffer
AppendText(pair.second);
}

_lineBuffer.clear();

// Scroll to bottom
Expand Down

0 comments on commit 7cd838c

Please sign in to comment.