aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
{