Disable aspect ratio checkbox when stretch is not checked
This commit is contained in:
parent
dd79d089f6
commit
9085fb8285
|
@ -156,6 +156,8 @@ void AppearanceSettingsPage::Load() {
|
||||||
ui_->opacity_slider->setValue(s.value(kOpacityLevel, kDefaultOpacityLevel).toInt());
|
ui_->opacity_slider->setValue(s.value(kOpacityLevel, kDefaultOpacityLevel).toInt());
|
||||||
ui_->checkbox_system_icons->setChecked(s.value(kSystemThemeIcons, false).toBool());
|
ui_->checkbox_system_icons->setChecked(s.value(kSystemThemeIcons, false).toBool());
|
||||||
|
|
||||||
|
if (!ui_->checkbox_background_image_stretch->isChecked()) ui_->checkbox_background_image_keep_aspect_ratio->setDisabled(true);
|
||||||
|
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -187,10 +189,14 @@ void AppearanceSettingsPage::Save() {
|
||||||
}
|
}
|
||||||
else if (ui_->use_custom_background_image->isChecked()) {
|
else if (ui_->use_custom_background_image->isChecked()) {
|
||||||
background_image_type_ = BackgroundImageType_Custom;
|
background_image_type_ = BackgroundImageType_Custom;
|
||||||
s.setValue(kBackgroundImageFilename, background_image_filename_);
|
|
||||||
}
|
}
|
||||||
s.setValue(kBackgroundImageType, background_image_type_);
|
s.setValue(kBackgroundImageType, background_image_type_);
|
||||||
|
|
||||||
|
if (background_image_type_ == BackgroundImageType_Custom)
|
||||||
|
s.setValue(kBackgroundImageFilename, background_image_filename_);
|
||||||
|
else
|
||||||
|
s.remove(kBackgroundImageFilename);
|
||||||
|
|
||||||
BackgroundImagePosition backgroundimageposition = BackgroundImagePosition(ui_->combobox_backgroundimageposition->itemData(ui_->combobox_backgroundimageposition->currentIndex()).toInt());
|
BackgroundImagePosition backgroundimageposition = BackgroundImagePosition(ui_->combobox_backgroundimageposition->itemData(ui_->combobox_backgroundimageposition->currentIndex()).toInt());
|
||||||
s.setValue(kBackgroundImageMaxSize, ui_->spinbox_background_image_maxsize->value());
|
s.setValue(kBackgroundImageMaxSize, ui_->spinbox_background_image_maxsize->value());
|
||||||
s.setValue(kBackgroundImagePosition, backgroundimageposition);
|
s.setValue(kBackgroundImagePosition, backgroundimageposition);
|
||||||
|
@ -243,6 +249,7 @@ void AppearanceSettingsPage::SelectBackgroundColor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppearanceSettingsPage::UseCustomColorSetOptionChanged(bool checked) {
|
void AppearanceSettingsPage::UseCustomColorSetOptionChanged(bool checked) {
|
||||||
|
|
||||||
if (checked) {
|
if (checked) {
|
||||||
dialog()->appearance()->ChangeForegroundColor(current_foreground_color_);
|
dialog()->appearance()->ChangeForegroundColor(current_foreground_color_);
|
||||||
dialog()->appearance()->ChangeBackgroundColor(current_background_color_);
|
dialog()->appearance()->ChangeBackgroundColor(current_background_color_);
|
||||||
|
@ -250,6 +257,7 @@ void AppearanceSettingsPage::UseCustomColorSetOptionChanged(bool checked) {
|
||||||
else {
|
else {
|
||||||
dialog()->appearance()->ResetToSystemDefaultTheme();
|
dialog()->appearance()->ResetToSystemDefaultTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppearanceSettingsPage::InitColorSelectorsColors() {
|
void AppearanceSettingsPage::InitColorSelectorsColors() {
|
||||||
|
|
Loading…
Reference in New Issue