Removes an unused knob and enum (knob04.png aka knobGreen_17)
Removes the knob image knob04.png. This knob corresponded to knobGreen_17 which was not used anywhere in the code. To be able to remove the enum value it was necessary to change the knob loading code in Knob::onKnobNumUpdated. However, the changed implementation is more explicit and therefore likely better to understand.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 656 B |
@@ -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
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user