mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 19:31:02 +01:00
Minor style changes
This commit is contained in:
parent
40248a8f48
commit
65f1dca716
@ -1023,8 +1023,8 @@ void PlaylistView::ReloadSettings() {
|
||||
// set_background_image when it is not needed, as this will cause the fading
|
||||
// animation to start again. This also avoid to do useless
|
||||
// "force_background_redraw".
|
||||
if (background_image_filename != background_image_filename_
|
||||
|| background_type != background_image_type_ ||
|
||||
if (background_image_filename != background_image_filename_ ||
|
||||
background_type != background_image_type_ ||
|
||||
blur_radius_ != blur_radius) {
|
||||
// Store background properties
|
||||
background_image_type_ = background_type;
|
||||
@ -1202,7 +1202,7 @@ void PlaylistView::set_background_image(const QImage& image) {
|
||||
}
|
||||
|
||||
if (blur_radius_ != 0)
|
||||
background_image_ = blur_background_image(background_image_, blur_radius_, false);
|
||||
background_image_ = BlurImage(background_image_, blur_radius_, false);
|
||||
|
||||
if (isVisible()) {
|
||||
previous_background_image_opacity_ = 1.0;
|
||||
@ -1211,7 +1211,7 @@ void PlaylistView::set_background_image(const QImage& image) {
|
||||
}
|
||||
|
||||
|
||||
QImage PlaylistView::blur_background_image(const QImage& image, int radius, bool alphaOnly = false)
|
||||
QImage PlaylistView::BlurImage(const QImage& image, int radius, bool alphaOnly = false)
|
||||
{
|
||||
int tab[] = { 14, 10, 8, 6, 5, 5, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 };
|
||||
int alpha = (radius < 1) ? 16 : (radius > 17) ? 1 : tab[radius-1];
|
||||
|
@ -167,7 +167,7 @@ class PlaylistView : public QTreeView {
|
||||
// Save image as the background_image_ after applying some modifications (opacity, ...).
|
||||
// Should be used instead of modifying background_image_ directly
|
||||
void set_background_image(const QImage& image);
|
||||
QImage blur_background_image(const QImage& image, int radius, bool alphaOnly);
|
||||
QImage BlurImage(const QImage& image, int radius, bool alphaOnly);
|
||||
|
||||
private:
|
||||
static const int kGlowIntensitySteps;
|
||||
|
Loading…
Reference in New Issue
Block a user