mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-15 10:08:08 +01:00
Tweak the background image settings a bit
- Disable "do not cut" option when keep aspect ratio is unchecked - Shorten text and add spacer to widget
This commit is contained in:
parent
5cde33711e
commit
4f0a2515f8
@ -99,6 +99,8 @@ AppearanceSettingsPage::AppearanceSettingsPage(SettingsDialog *dialog)
|
||||
connect(ui_->checkbox_background_image_stretch, SIGNAL(toggled(bool)), ui_->checkbox_background_image_keep_aspect_ratio, SLOT(setEnabled(bool)));
|
||||
connect(ui_->checkbox_background_image_stretch, SIGNAL(toggled(bool)), ui_->spinbox_background_image_maxsize, SLOT(setDisabled(bool)));
|
||||
|
||||
connect(ui_->checkbox_background_image_keep_aspect_ratio, SIGNAL(toggled(bool)), ui_->checkbox_background_image_do_not_cut, SLOT(setEnabled(bool)));
|
||||
|
||||
Load();
|
||||
|
||||
}
|
||||
@ -159,10 +161,8 @@ void AppearanceSettingsPage::Load() {
|
||||
ui_->opacity_slider->setValue(s.value(kOpacityLevel, kDefaultOpacityLevel).toInt());
|
||||
ui_->checkbox_system_icons->setChecked(s.value(kSystemThemeIcons, false).toBool());
|
||||
|
||||
if (!ui_->checkbox_background_image_stretch->isChecked()) {
|
||||
ui_->checkbox_background_image_do_not_cut->setDisabled(true);
|
||||
ui_->checkbox_background_image_keep_aspect_ratio->setDisabled(true);
|
||||
}
|
||||
ui_->checkbox_background_image_keep_aspect_ratio->setEnabled(ui_->checkbox_background_image_stretch->isChecked());
|
||||
ui_->checkbox_background_image_do_not_cut->setEnabled(ui_->checkbox_background_image_stretch->isChecked() && ui_->checkbox_background_image_keep_aspect_ratio->isChecked());
|
||||
|
||||
s.endGroup();
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>596</width>
|
||||
<width>674</width>
|
||||
<height>627</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -264,7 +264,14 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkbox_background_image_stretch">
|
||||
<property name="text">
|
||||
<string>Stretch background image to fill playlist background</string>
|
||||
<string>Stretch image to fill playlist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkbox_background_image_keep_aspect_ratio">
|
||||
<property name="text">
|
||||
<string>Keep aspect ratio</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -276,11 +283,17 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkbox_background_image_keep_aspect_ratio">
|
||||
<property name="text">
|
||||
<string>Keep aspect ratio</string>
|
||||
<spacer name="spacer_background_image_stretch">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user