Restore the blur amount setting when the settings dialog is loaded. Also remove some unusued variables. Fixes issue 3497
This commit is contained in:
parent
578e143cf1
commit
c03f69daa7
@ -73,7 +73,6 @@ class PlaylistView : public QTreeView {
|
|||||||
// Constants for settings: are persistent, values should not be changed
|
// Constants for settings: are persistent, values should not be changed
|
||||||
static const char* kSettingBackgroundImageType;
|
static const char* kSettingBackgroundImageType;
|
||||||
static const char* kSettingBackgroundImageFilename;
|
static const char* kSettingBackgroundImageFilename;
|
||||||
static const int kSettingBackgroundBlurLevel;
|
|
||||||
|
|
||||||
static ColumnAlignmentMap DefaultColumnAlignment();
|
static ColumnAlignmentMap DefaultColumnAlignment();
|
||||||
|
|
||||||
|
@ -51,13 +51,14 @@ AppearanceSettingsPage::AppearanceSettingsPage(SettingsDialog* dialog)
|
|||||||
ui_->setupUi(this);
|
ui_->setupUi(this);
|
||||||
setWindowIcon(IconLoader::Load("view-media-visualization"));
|
setWindowIcon(IconLoader::Load("view-media-visualization"));
|
||||||
|
|
||||||
|
connect(ui_->blur_slider, SIGNAL(valueChanged(int)), SLOT(BlurLevelChanged(int)));
|
||||||
|
connect(ui_->opacity_slider, SIGNAL(valueChanged(int)), SLOT(OpacityLevelChanged(int)));
|
||||||
|
|
||||||
Load();
|
Load();
|
||||||
|
|
||||||
connect(ui_->select_foreground_color, SIGNAL(pressed()), SLOT(SelectForegroundColor()));
|
connect(ui_->select_foreground_color, SIGNAL(pressed()), SLOT(SelectForegroundColor()));
|
||||||
connect(ui_->select_background_color, SIGNAL(pressed()), SLOT(SelectBackgroundColor()));
|
connect(ui_->select_background_color, SIGNAL(pressed()), SLOT(SelectBackgroundColor()));
|
||||||
connect(ui_->use_a_custom_color_set, SIGNAL(toggled(bool)), SLOT(UseCustomColorSetOptionChanged(bool)));
|
connect(ui_->use_a_custom_color_set, SIGNAL(toggled(bool)), SLOT(UseCustomColorSetOptionChanged(bool)));
|
||||||
connect(ui_->blur_slider, SIGNAL(valueChanged(int)), SLOT(BlurLevelChanged(int)));
|
|
||||||
connect(ui_->opacity_slider, SIGNAL(valueChanged(int)), SLOT(OpacityLevelChanged(int)));
|
|
||||||
|
|
||||||
connect(ui_->select_background_image_filename_button, SIGNAL(pressed()), SLOT(SelectBackgroundImage()));
|
connect(ui_->select_background_image_filename_button, SIGNAL(pressed()), SLOT(SelectBackgroundImage()));
|
||||||
connect(ui_->use_custom_background_image, SIGNAL(toggled(bool)),
|
connect(ui_->use_custom_background_image, SIGNAL(toggled(bool)),
|
||||||
@ -128,10 +129,8 @@ void AppearanceSettingsPage::Load() {
|
|||||||
DisableBlurSlider(true);
|
DisableBlurSlider(true);
|
||||||
}
|
}
|
||||||
ui_->background_image_filename->setText(playlist_view_background_image_filename_);
|
ui_->background_image_filename->setText(playlist_view_background_image_filename_);
|
||||||
/* There has to be a way to just simulate the change... */
|
ui_->blur_slider->setValue(s.value("blur_radius").toInt());
|
||||||
ui_->opacity_slider->setValue(s.value("opacity_level").toInt());
|
ui_->opacity_slider->setValue(s.value("opacity_level").toInt());
|
||||||
OpacityLevelChanged(s.value("opacity_level").toInt());
|
|
||||||
|
|
||||||
|
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
@ -254,12 +253,10 @@ void AppearanceSettingsPage::SelectBackgroundImage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AppearanceSettingsPage::BlurLevelChanged(int value) {
|
void AppearanceSettingsPage::BlurLevelChanged(int value) {
|
||||||
background_blur_radius_ = value;
|
|
||||||
ui_->background_blur_radius_label->setText(QString("%1px").arg(value));
|
ui_->background_blur_radius_label->setText(QString("%1px").arg(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppearanceSettingsPage::OpacityLevelChanged(int percent) {
|
void AppearanceSettingsPage::OpacityLevelChanged(int percent) {
|
||||||
background_opacity_level_ = percent;
|
|
||||||
ui_->background_opacity_label->setText(QString("%1\%").arg(percent));
|
ui_->background_opacity_label->setText(QString("%1\%").arg(percent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,8 +65,6 @@ private:
|
|||||||
QColor current_background_color_;
|
QColor current_background_color_;
|
||||||
PlaylistView::BackgroundImageType playlist_view_background_image_type_;
|
PlaylistView::BackgroundImageType playlist_view_background_image_type_;
|
||||||
QString playlist_view_background_image_filename_;
|
QString playlist_view_background_image_filename_;
|
||||||
int background_blur_radius_;
|
|
||||||
int background_opacity_level_;
|
|
||||||
|
|
||||||
bool initialised_moodbar_previews_;
|
bool initialised_moodbar_previews_;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user