Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
corrados committed Jul 7, 2020
1 parent 38cdd65 commit 46bb143
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/audiomixerboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ CChannelFader::CChannelFader ( QWidget* pNW )
pMainGrid->addWidget ( pLabelInstBox );

// reset current fader
strGroupBaseText = "Grp"; // this will most probably overwritten by SetGUIDesign()
iInstrPicFixedWidth = INVALID_INDEX; // this will most probably overwritten by SetGUIDesign()
strGroupBaseText = "Grp"; // this will most probably overwritten by SetGUIDesign()
iInstrPicMaxWidth = INVALID_INDEX; // this will most probably overwritten by SetGUIDesign()
Reset();

// add help text to controls
Expand Down Expand Up @@ -228,7 +228,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
pcbSolo->setText ( tr ( "SOLO" ) );
strGroupBaseText = tr ( "GRP" );
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_LED );
iInstrPicFixedWidth = INVALID_INDEX; // no instrument picture scaling
iInstrPicMaxWidth = INVALID_INDEX; // no instrument picture scaling
break;

case GD_SLIMFADER:
Expand All @@ -243,7 +243,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
pcbSolo->setText ( tr ( "S" ) );
strGroupBaseText = tr ( "G" );
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_SLIM_BAR );
iInstrPicFixedWidth = 18; // scale instrument picture to avoid enlarging the width by the picture
iInstrPicMaxWidth = 18; // scale instrument picture to avoid enlarging the width by the picture
break;

default:
Expand All @@ -259,7 +259,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
pcbSolo->setText ( tr ( "Solo" ) );
strGroupBaseText = tr ( "Grp" );
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_BAR );
iInstrPicFixedWidth = INVALID_INDEX; // no instrument picture scaling
iInstrPicMaxWidth = INVALID_INDEX; // no instrument picture scaling
break;
}

Expand Down Expand Up @@ -631,10 +631,10 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo )
// set correct picture
QPixmap pixInstr ( strCurResourceRef );

if ( ( iInstrPicFixedWidth != INVALID_INDEX ) && ( pixInstr.width() > iInstrPicFixedWidth ) )
if ( ( iInstrPicMaxWidth != INVALID_INDEX ) && ( pixInstr.width() > iInstrPicMaxWidth ) )
{
// scale instrument picture on request (scale to the width with correct aspect ratio)
plblInstrument->setPixmap ( pixInstr.scaledToWidth ( iInstrPicFixedWidth, Qt::SmoothTransformation ) );
plblInstrument->setPixmap ( pixInstr.scaledToWidth ( iInstrPicMaxWidth, Qt::SmoothTransformation ) );
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/audiomixerboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class CChannelFader : public QObject
double dPreviousFaderLevel;
int iGroupID;
QString strGroupBaseText;
int iInstrPicFixedWidth;
int iInstrPicMaxWidth;

public slots:
void OnLevelValueChanged ( int value ) { SendFaderLevelToServer ( value, false ); }
Expand Down

0 comments on commit 46bb143

Please sign in to comment.