Merge pull request #2644 from michaelgregorius/knob-enum-cleanup

Removes an unused knob and enum (knob04.png aka knobGreen_17)
This commit is contained in:
Michael Gregorius
2016-03-15 19:19:55 +01:00
3 changed files with 22 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

View File

@@ -38,7 +38,7 @@ class TextFloat;
enum knobTypes
{
knobDark_28, knobBright_26, knobSmall_17, knobGreen_17, knobVintage_32, knobStyled
knobDark_28, knobBright_26, knobSmall_17, knobVintage_32, knobStyled
} ;

View File

@@ -111,8 +111,27 @@ void Knob::onKnobNumUpdated()
{
if( m_knobNum != knobStyled )
{
m_knobPixmap = new QPixmap( embed::getIconPixmap( QString( "knob0" +
QString::number( m_knobNum + 1 ) ).toUtf8().constData() ) );
QString knobFilename;
switch (m_knobNum)
{
case knobDark_28:
knobFilename = "knob01";
break;
case knobBright_26:
knobFilename = "knob02";
break;
case knobSmall_17:
knobFilename = "knob03";
break;
case knobVintage_32:
knobFilename = "knob05";
break;
case knobStyled: // only here to stop the compiler from complaining
break;
}
// If knobFilename is still empty here we should get the fallback pixmap of size 1x1
m_knobPixmap = new QPixmap( embed::getIconPixmap( knobFilename.toUtf8().constData() ) );
setFixedSize( m_knobPixmap->width(), m_knobPixmap->height() );
}
@@ -431,13 +450,6 @@ void Knob::drawKnob( QPainter * _p )
p.drawLine( ln );
break;
}
case knobGreen_17:
{
p.setPen( QPen( QApplication::palette().color( QPalette::Active,
QPalette::BrightText), 2 ) );
p.drawLine( calculateLine( mid, radius ) );
break;
}
case knobVintage_32:
{
p.setPen( QPen( QApplication::palette().color( QPalette::Active,