From e73450cf43dfcc9a3e99782434edc4e7a1e46627 Mon Sep 17 00:00:00 2001 From: "Sebastian J. Mielke" Date: Tue, 11 Mar 2014 16:08:24 +0100 Subject: [PATCH] Moodbar-Trackslider uses the full available height 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). --- src/moodbar/moodbarproxystyle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/moodbar/moodbarproxystyle.cpp b/src/moodbar/moodbarproxystyle.cpp index 83cd7ab2a..79fe27237 100644 --- a/src/moodbar/moodbarproxystyle.cpp +++ b/src/moodbar/moodbarproxystyle.cpp @@ -98,6 +98,12 @@ void MoodbarProxyStyle::SetMoodbarEnabled(bool enabled) { void MoodbarProxyStyle::NextState() { const bool visible = enabled_ && !data_.isEmpty(); + // While the regular slider should stay at the standard size (Fixed), + // moodbars should use all available space (MinimumExpanding). + slider_->setSizePolicy(QSizePolicy::Expanding, + visible ? QSizePolicy::MinimumExpanding : QSizePolicy::Fixed); + slider_->updateGeometry(); + if (show_moodbar_action_) { show_moodbar_action_->setChecked(enabled_); }