aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-12-06 14:35:23 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-06 09:54:36 -0800
commitf20e07dcf16f28b62cfad51a39111c58e9dc25a7 (patch)
treebff1e161093d5056c599f3d404d04427bf0f3cd7
parent8a116ba5106a1e07aac0ed54d976fa98cb1c5a4e (diff)
downloadsubsurface-f20e07dcf16f28b62cfad51a39111c58e9dc25a7.tar.gz
Code Cleanup
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/preferences.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 3bd9f942a..9d8aa061c 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -23,21 +23,16 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, Qt::WindowFlags f) : QDial
rememberPrefs();
}
+#define DANGER_GF ( gf > 100 ) ? "* { color: red; }" : ""
void PreferencesDialog::gflowChanged(int gf)
{
- if (gf > 100)
- ui.gflow->setStyleSheet("* { color: red; }");
- else
- ui.gflow->setStyleSheet("");
+ ui.gflow->setStyleSheet(DANGER_GF);
}
-
void PreferencesDialog::gfhighChanged(int gf)
{
- if (gf > 100)
- ui.gfhigh->setStyleSheet("* { color: red; }");
- else
- ui.gfhigh->setStyleSheet("");
+ ui.gfhigh->setStyleSheet(DANGER_GF);
}
+#undef DANGER_GF
void PreferencesDialog::showEvent(QShowEvent *event)
{