diff --git a/data/data.qrc b/data/data.qrc index fafe99de3..3c6eb01f7 100644 --- a/data/data.qrc +++ b/data/data.qrc @@ -19,6 +19,7 @@ html/oauthsuccess.html pictures/strawberry.png pictures/strawberry-faded.png + pictures/strawbs.png pictures/nomusic.png pictures/cdcase.png pictures/musicbrainz.png diff --git a/data/pictures/strawbs.png b/data/pictures/strawbs.png new file mode 100644 index 000000000..99ff43260 Binary files /dev/null and b/data/pictures/strawbs.png differ diff --git a/data/style/strawberry.css b/data/style/strawberry.css index cda600d42..4f6fed06e 100644 --- a/data/style/strawberry.css +++ b/data/style/strawberry.css @@ -11,6 +11,14 @@ background-clip: content; } +#playlist[strawbs_background_enabled = "true"] { + background-image: url(:pictures/strawbs.png); + background-attachment: fixed; + background-position: bottom right; + background-repeat: none; + background-clip: content; +} + QToolButton { border: 2px solid transparent; border-radius: 3px; diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index 13b2c7c4a..918c4dd55 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -1128,6 +1128,7 @@ void PlaylistView::ReloadSettings() { previous_background_image_ = QPixmap(); } setProperty("default_background_enabled", background_image_type_ == AppearanceSettingsPage::BackgroundImageType_Default); + setProperty("strawbs_background_enabled", background_image_type_ == AppearanceSettingsPage::BackgroundImageType_Strawbs); emit BackgroundPropertyChanged(); force_background_redraw_ = true; } diff --git a/src/settings/appearancesettingspage.cpp b/src/settings/appearancesettingspage.cpp index b45d61ee7..8e32ed2d0 100644 --- a/src/settings/appearancesettingspage.cpp +++ b/src/settings/appearancesettingspage.cpp @@ -105,8 +105,9 @@ AppearanceSettingsPage::AppearanceSettingsPage(SettingsDialog *dialog) connect(ui_->use_default_background, SIGNAL(toggled(bool)), ui_->widget_custom_background_image_options, SLOT(setDisabled(bool))); connect(ui_->use_no_background, SIGNAL(toggled(bool)), ui_->widget_custom_background_image_options, SLOT(setDisabled(bool))); - connect(ui_->use_custom_background_image, SIGNAL(toggled(bool)), ui_->widget_custom_background_image_options, SLOT(setEnabled(bool))); connect(ui_->use_album_cover_background, SIGNAL(toggled(bool)), ui_->widget_custom_background_image_options, SLOT(setEnabled(bool))); + connect(ui_->use_strawbs_background, SIGNAL(toggled(bool)), ui_->widget_custom_background_image_options, SLOT(setDisabled(bool))); + connect(ui_->use_custom_background_image, SIGNAL(toggled(bool)), ui_->widget_custom_background_image_options, SLOT(setEnabled(bool))); connect(ui_->select_background_image_filename_button, SIGNAL(pressed()), SLOT(SelectBackgroundImage())); connect(ui_->use_custom_background_image, SIGNAL(toggled(bool)), ui_->background_image_filename, SLOT(setEnabled(bool))); @@ -165,18 +166,21 @@ void AppearanceSettingsPage::Load() { ui_->use_a_custom_color_set->setChecked(original_use_a_custom_color_set_); switch (background_image_type_) { + case BackgroundImageType_Default: + ui_->use_default_background->setChecked(true); + break; case BackgroundImageType_None: ui_->use_no_background->setChecked(true); break; case BackgroundImageType_Album: ui_->use_album_cover_background->setChecked(true); break; + case BackgroundImageType_Strawbs: + ui_->use_strawbs_background->setChecked(true); + break; case BackgroundImageType_Custom: ui_->use_custom_background_image->setChecked(true); break; - case BackgroundImageType_Default: - default: - ui_->use_default_background->setChecked(true); } ui_->background_image_filename->setText(background_image_filename_); @@ -222,14 +226,17 @@ void AppearanceSettingsPage::Save() { } background_image_filename_ = ui_->background_image_filename->text(); - if (ui_->use_no_background->isChecked()) { + if (ui_->use_default_background->isChecked()) { + background_image_type_ = BackgroundImageType_Default; + } + else if (ui_->use_no_background->isChecked()) { background_image_type_ = BackgroundImageType_None; } else if (ui_->use_album_cover_background->isChecked()) { background_image_type_ = BackgroundImageType_Album; } - else if (ui_->use_default_background->isChecked()) { - background_image_type_ = BackgroundImageType_Default; + else if (ui_->use_strawbs_background->isChecked()) { + background_image_type_ = BackgroundImageType_Strawbs; } else if (ui_->use_custom_background_image->isChecked()) { background_image_type_ = BackgroundImageType_Custom; diff --git a/src/settings/appearancesettingspage.h b/src/settings/appearancesettingspage.h index 532a2f10e..38a25a63b 100644 --- a/src/settings/appearancesettingspage.h +++ b/src/settings/appearancesettingspage.h @@ -78,7 +78,8 @@ class AppearanceSettingsPage : public SettingsPage { BackgroundImageType_Default, BackgroundImageType_None, BackgroundImageType_Custom, - BackgroundImageType_Album + BackgroundImageType_Album, + BackgroundImageType_Strawbs }; enum BackgroundImagePosition { diff --git a/src/settings/appearancesettingspage.ui b/src/settings/appearancesettingspage.ui index aa9884f1b..6666eb4b5 100644 --- a/src/settings/appearancesettingspage.ui +++ b/src/settings/appearancesettingspage.ui @@ -7,7 +7,7 @@ 0 0 674 - 865 + 896 @@ -169,6 +169,13 @@ + + + + A Taste of Strawbs + + +