diff options
| author | con <qtc-committer@nokia.com> | 2009-12-14 17:31:42 +0100 |
|---|---|---|
| committer | con <qtc-committer@nokia.com> | 2009-12-14 17:33:26 +0100 |
| commit | d94b7b08c048f2f45b6435d48fa06b4cfb747e03 (patch) | |
| tree | 3b341ddef901c12dfbda85720bdc53fd03163053 | |
| parent | b182d5ac53c79de82441edff6488a213f6b2df33 (diff) | |
| download | qt-creator-d94b7b08c048f2f45b6435d48fa06b4cfb747e03.tar.gz | |
Better background color for "old" application output.
Use "base" and "text" instead of "window" and "windowText",
also make it lighter.
Reviewed-by: dt
| -rw-r--r-- | src/plugins/projectexplorer/outputwindow.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/projectexplorer/outputwindow.cpp b/src/plugins/projectexplorer/outputwindow.cpp index a29d4a9228..b17e96b323 100644 --- a/src/plugins/projectexplorer/outputwindow.cpp +++ b/src/plugins/projectexplorer/outputwindow.cpp @@ -467,11 +467,13 @@ void OutputWindow::grayOutOldContent() QTextCursor cursor = textCursor(); cursor.select(QTextCursor::Document); QTextBlockFormat tbf; - const QColor bkgColor = palette().window().color(); - const QColor fgdColor = palette().windowText().color(); - tbf.setBackground(QColor((0.5 * bkgColor.red() + 0.5* fgdColor.red()),\ - (0.5 * bkgColor.green() + 0.5* fgdColor.green()),\ - (0.5 * bkgColor.blue() + 0.5* fgdColor.blue()) )); + const QColor bkgColor = palette().base().color(); + const QColor fgdColor = palette().text().color(); + double bkgFactor = 0.85; + double fgdFactor = 1.-bkgFactor; + tbf.setBackground(QColor((bkgFactor * bkgColor.red() + fgdFactor * fgdColor.red()), + (bkgFactor * bkgColor.green() + fgdFactor * fgdColor.green()), + (bkgFactor * bkgColor.blue() + fgdFactor * fgdColor.blue()) )); cursor.mergeBlockFormat(tbf); cursor.movePosition(QTextCursor::End); |
