Skip to content

Commit

Permalink
gui: avoid a flashing bright window during startup
Browse files Browse the repository at this point in the history
The very first paint event causes a bright flash to appear before the
configured colors are applied. Swap the uninitialized foreground and
background colors to avoid a blinding flash during startup.
  • Loading branch information
davvid committed Feb 28, 2024
1 parent e04081c commit 9a1d56a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gui/shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ private slots:

// highlight fg/bg - from redraw:highlightset - by default we
// use the values from above
QColor m_hg_foreground{ Qt::black };
QColor m_hg_background{ Qt:: white };
QColor m_hg_foreground{ Qt::white };
QColor m_hg_background{ Qt::black };
QColor m_hg_special;

/// Modern 'ext_linegrid' highlight definition map
Expand Down
4 changes: 2 additions & 2 deletions src/gui/shellwidget/shellwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ public slots:
ShellContents m_contents{ 0, 0 };
QSize m_cellSize;
int m_ascent;
QColor m_bgColor{ Qt::white };
QColor m_fgColor{ Qt::black };
QColor m_bgColor{ Qt::black };
QColor m_fgColor{ Qt::white };
QColor m_spColor;
int m_lineSpace{ 0 };
bool m_isLigatureModeEnabled{ false };
Expand Down

0 comments on commit 9a1d56a

Please sign in to comment.