Mercurial > hg > svgui
changeset 933:9022635c615a tonioni
Fixes to enabled/disabled state in level-pan tool button
author | Chris Cannam |
---|---|
date | Wed, 25 Mar 2015 11:41:17 +0000 |
parents | 37bb4b416c52 |
children | 325a7aa69055 |
files | widgets/LevelPanToolButton.cpp widgets/LevelPanToolButton.h |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- 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);