forked from qt-creator/qt-creator
Theming: debugger
Theme the text colors of - the debugger's log window - the debugger's watch items In particular, the watch items were hard to read (default color was black, color for changed value was red). For the dark theme, the default color for watch items is now white (the text color), changed items appear red, and invalid items appear grey. Change-Id: I7f9534b054c44d635b106fa0e9ac70479c9fcac5 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/savedaction.h>
|
||||
#include <utils/checkablemessagebox.h>
|
||||
#include <utils/theme/theme.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
@@ -712,19 +713,19 @@ QString WatchItem::displayType() const
|
||||
|
||||
QColor WatchItem::valueColor() const
|
||||
{
|
||||
static const QColor red(200, 0, 0);
|
||||
static const QColor gray(140, 140, 140);
|
||||
using Utils::Theme;
|
||||
Theme *theme = Utils::creatorTheme();
|
||||
if (watchModel()) {
|
||||
if (!valueEnabled)
|
||||
return gray;
|
||||
return theme->color(Theme::Debugger_WatchItem_ValueInvalid);
|
||||
if (!watchModel()->m_contentsValid && !isInspect())
|
||||
return gray;
|
||||
return theme->color(Theme::Debugger_WatchItem_ValueInvalid);
|
||||
if (value.isEmpty()) // This might still show 0x...
|
||||
return gray;
|
||||
return theme->color(Theme::Debugger_WatchItem_ValueInvalid);
|
||||
if (value != watchModel()->m_valueCache.value(iname))
|
||||
return red;
|
||||
return theme->color(Theme::Debugger_WatchItem_ValueChanged);
|
||||
}
|
||||
return QColor();
|
||||
return theme->color(Theme::Debugger_WatchItem_ValueNormal);
|
||||
}
|
||||
|
||||
QVariant WatchItem::data(int column, int role) const
|
||||
|
||||
Reference in New Issue
Block a user