Code Cleanup

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-12-06 14:35:23 -02:00 committed by Dirk Hohndel
parent 8a116ba510
commit f20e07dcf1

View file

@ -23,21 +23,16 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, Qt::WindowFlags f) : QDial
rememberPrefs(); rememberPrefs();
} }
#define DANGER_GF ( gf > 100 ) ? "* { color: red; }" : ""
void PreferencesDialog::gflowChanged(int gf) void PreferencesDialog::gflowChanged(int gf)
{ {
if (gf > 100) ui.gflow->setStyleSheet(DANGER_GF);
ui.gflow->setStyleSheet("* { color: red; }");
else
ui.gflow->setStyleSheet("");
} }
void PreferencesDialog::gfhighChanged(int gf) void PreferencesDialog::gfhighChanged(int gf)
{ {
if (gf > 100) ui.gfhigh->setStyleSheet(DANGER_GF);
ui.gfhigh->setStyleSheet("* { color: red; }");
else
ui.gfhigh->setStyleSheet("");
} }
#undef DANGER_GF
void PreferencesDialog::showEvent(QShowEvent *event) void PreferencesDialog::showEvent(QShowEvent *event)
{ {