Merge pull request #4239 from sjm1835/patch-1

Moodbar-Trackslider uses the full available height
This commit is contained in:
John Maguire 2014-03-11 16:41:24 +01:00
commit 213fb2cfb6
1 changed files with 6 additions and 0 deletions

View File

@ -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_);
}