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).
This commit is contained in:
parent
e944abfe45
commit
e73450cf43
|
@ -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_);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue