When switching playback from an item for which the moodbar is not
displayed (e.g. an internet stream), to an item for which it is
displayed (e.g. a local mp3 file), Clementine sometimes crashes.
This happens because the slider_opt->maximum and slider_opt->minimum
have the value 0 (their default value), and the difference is used as a
divisor. This gives a division by 0, and a SIGFPE.
This problem has been fixed in commit af42cce. However, when a9f9b0e
reverted 3f79fa5, a little to much was reverted and we lost what af42cce
did. This patch re-introduces the fix.
Fixes#5261
moodbar: Add comment
Previously, the slide wasn't displayed at the exact position where the user clicked, and the moodbar's width was equal to the slider's width, while it should have been as long as long the groove.
When determining the next state (for rendering the change), the slider widgets vertical SizePolicy is changed from Fixed to MinimumExpanding (same thing works the other way around).