# HG changeset patch # User Chris Cannam # Date 1427283677 0 # Node ID 9022635c615a2b74653ffcb3ca809fae389a3f35 # Parent 37bb4b416c52ff6276a29a0c9ba22f0b9c1d7574 Fixes to enabled/disabled state in level-pan tool button diff -r 37bb4b416c52 -r 9022635c615a widgets/LevelPanToolButton.cpp --- a/widgets/LevelPanToolButton.cpp Wed Mar 25 11:27:46 2015 +0000 +++ b/widgets/LevelPanToolButton.cpp Wed Mar 25 11:41:17 2015 +0000 @@ -75,8 +75,8 @@ px.fill(Qt::transparent); setIcon(px); - m_lpw->setFixedWidth(m_pixels * 4); - m_lpw->setFixedHeight(m_pixels * 4); + m_lpw->setFixedWidth(m_pixels * 3); + m_lpw->setFixedHeight(m_pixels * 3); } void @@ -94,6 +94,13 @@ } void +LevelPanToolButton::setEnabled(bool enabled) +{ + m_lpw->setEnabled(enabled); + QToolButton::setEnabled(enabled); +} + +void LevelPanToolButton::selfLevelChanged(float level) { if (level > 0.f) { diff -r 37bb4b416c52 -r 9022635c615a widgets/LevelPanToolButton.h --- a/widgets/LevelPanToolButton.h Wed Mar 25 11:27:46 2015 +0000 +++ b/widgets/LevelPanToolButton.h Wed Mar 25 11:41:17 2015 +0000 @@ -42,6 +42,8 @@ /// Set pan in the range [-1,1] -- will be rounded void setPan(float); + void setEnabled(bool enabled); + signals: void levelChanged(float); void panChanged(float);