Output panes: Improve the way to signal that filtering is active

At the moment, background and foreground colors of an output pane are
changed (via the widget's palette) when filtering is active, in order to
make it clear to the user that the output is being tampered with. There
are several problems there:
    - The chosen background color is quite garish.
    - More importantly, the palette change has no effect in the
      compile and app output panes, because their output is explicitly
      formatted and thus not affected by the general text color change.
      As a result, the output may no longer be readable.

We fix this by choosing a less intrusive approach that simply darkens
(or lightens) the pane's background color a bit when filtering is
active. This is still clearly visible to the user.

Change-Id: I41e053b4b218be57fe7655e314d4ebf93f59f505
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Kandeler
2019-06-04 16:34:00 +02:00
parent b94c725f0f
commit 2391ef6088
5 changed files with 13 additions and 38 deletions

View File

@@ -53,8 +53,6 @@ MessageOutputWindow::MessageOutputWindow()
QColor activeHighlightedText = p.color(QPalette::Active, QPalette::HighlightedText);
p.setColor(QPalette::HighlightedText, activeHighlightedText);
m_widget->setPalette(p);
m_widget->setHighlightBgColor(p.color(QPalette::Highlight));
m_widget->setHighlightTextColor(p.color(QPalette::HighlightedText));
connect(this, &IOutputPane::zoomIn, m_widget, &Core::OutputWindow::zoomIn);
connect(this, &IOutputPane::zoomOut, m_widget, &Core::OutputWindow::zoomOut);