summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2016-03-29 17:13:37 +0200
committerSimon Rettberg2016-03-29 17:13:37 +0200
commitc8ad6d6fadf6bd1402e8faab1f21f85c87047c5f (patch)
tree0af4a9bc88cec28a47e028ca625e04ba713a3db6 /src
parentFix indentation (diff)
downloadvmchooser2-c8ad6d6fadf6bd1402e8faab1f21f85c87047c5f.tar.gz
vmchooser2-c8ad6d6fadf6bd1402e8faab1f21f85c87047c5f.tar.xz
vmchooser2-c8ad6d6fadf6bd1402e8faab1f21f85c87047c5f.zip
Use foreground instead of background for marking unusable vms
Diffstat (limited to 'src')
-rw-r--r--src/session.h2
-rw-r--r--src/sessiontreemodel.cpp4
-rw-r--r--src/vsession.cpp6
-rw-r--r--src/vsession.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/session.h b/src/session.h
index c490d88..907fbaa 100644
--- a/src/session.h
+++ b/src/session.h
@@ -30,7 +30,7 @@ class Session {
virtual int type() const = 0;
virtual SectionType section() const = 0;
virtual bool is64Bit() const { return false; }
- virtual QVariant backgroundRole() const { return QVariant(); }
+ virtual QVariant foregroundRole() const { return QVariant(); }
virtual bool operator<(const Session& s) const = 0;
diff --git a/src/sessiontreemodel.cpp b/src/sessiontreemodel.cpp
index 08b43e4..ac60ee9 100644
--- a/src/sessiontreemodel.cpp
+++ b/src/sessiontreemodel.cpp
@@ -53,8 +53,8 @@ QVariant SessionTreeModel::data(const QModelIndex &index, int role) const {
return s->shortDescription();
if (role == Qt::ToolTipRole)
return s->description();
- if (role == Qt::BackgroundRole)
- return s->backgroundRole();
+ if (role == Qt::ForegroundRole)
+ return s->foregroundRole();
if (role == Qt::DecorationRole) {
if (index.column() == 0) { // TODO: is this line needed?
return s->icon();
diff --git a/src/vsession.cpp b/src/vsession.cpp
index ef0e191..4c53c5a 100644
--- a/src/vsession.cpp
+++ b/src/vsession.cpp
@@ -430,10 +430,10 @@ bool VSession::is64Bit() const {
// TODO: vmbox, qemu-kvm, ...
}
-QVariant VSession::backgroundRole() const {
+QVariant VSession::foregroundRole() const {
if (!g_noVtx || !is64Bit())
- return Session::backgroundRole();
- return QColor(200, 200, 200);
+ return Session::foregroundRole();
+ return QColor(180, 180, 180);
}
bool VSession::operator<(const Session& other) const {
diff --git a/src/vsession.h b/src/vsession.h
index 820b411..f20b111 100644
--- a/src/vsession.h
+++ b/src/vsession.h
@@ -60,7 +60,7 @@ class VSession : public Session {
}
bool is64Bit() const;
- QVariant backgroundRole() const;
+ QVariant foregroundRole() const;
QString getAttribute(const QString& nodeName,
const QString& attribute = "param") const;