Disable blur slide when it makes sense to have it deactivated

This commit is contained in:
Arnaud Bienner 2012-11-09 20:22:39 +01:00
parent c4796564ea
commit 40248a8f48
2 changed files with 20 additions and 0 deletions

View File

@ -63,6 +63,16 @@ AppearanceSettingsPage::AppearanceSettingsPage(SettingsDialog* dialog)
ui_->background_image_filename, SLOT(setEnabled(bool)));
connect(ui_->use_custom_background_image, SIGNAL(toggled(bool)),
ui_->select_background_image_filename_button, SLOT(setEnabled(bool)));
connect(ui_->use_custom_background_image, SIGNAL(toggled(bool)),
ui_->blur_slider, SLOT(setEnabled(bool)));
connect(ui_->use_album_cover_background, SIGNAL(toggled(bool)),
ui_->blur_slider, SLOT(setEnabled(bool)));
connect(ui_->use_default_background, SIGNAL(toggled(bool)),
SLOT(DisableBlurSlider(bool)));
connect(ui_->use_no_background, SIGNAL(toggled(bool)),
SLOT(DisableBlurSlider(bool)));
}
AppearanceSettingsPage::~AppearanceSettingsPage() {
@ -274,3 +284,12 @@ void AppearanceSettingsPage::InitMoodbarPreviews() {
ui_->moodbar_group->hide();
#endif
}
void AppearanceSettingsPage::DisableBlurSlider(bool checked) {
ui_->blur_slider->setDisabled(checked);
ui_->background_blur_radius_label->setDisabled(checked);
ui_->select_background_blur_label->setDisabled(checked);
if (checked) {
ui_->blur_slider->setValue(0);
}
}

View File

@ -43,6 +43,7 @@ private slots:
void UseCustomColorSetOptionChanged(bool);
void SelectBackgroundImage();
void BlurLevelChanged(int);
void DisableBlurSlider(bool);
private:
static const int kMoodbarPreviewWidth;