diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-12-06 14:35:23 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-06 09:54:36 -0800 |
commit | f20e07dcf16f28b62cfad51a39111c58e9dc25a7 (patch) | |
tree | bff1e161093d5056c599f3d404d04427bf0f3cd7 /qt-ui | |
parent | 8a116ba5106a1e07aac0ed54d976fa98cb1c5a4e (diff) | |
download | subsurface-f20e07dcf16f28b62cfad51a39111c58e9dc25a7.tar.gz |
Code Cleanup
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/preferences.cpp | 13 |
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) { |