Skip to content

Commit

Permalink
Always show sample track panning knobs (LMMS#4477)
Browse files Browse the repository at this point in the history
Fix hidden sample track panning knobs when using compact track buttons
  • Loading branch information
PhysSong authored Jul 12, 2018
1 parent dac89ed commit 7713c9a
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/tracks/SampleTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,23 +755,20 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) :
m_volumeKnob->setVolumeKnob( true );
m_volumeKnob->setModel( &_t->m_volumeModel );
m_volumeKnob->setHintText( tr( "Channel volume:" ), "%" );
if( ConfigManager::inst()->value( "ui",
"compacttrackbuttons" ).toInt() )
{
m_volumeKnob->move( DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT-2*24, 2 );
}
else
{
m_volumeKnob->move( DEFAULT_SETTINGS_WIDGET_WIDTH-2*24, 2 );
}

int settingsWidgetWidth = ConfigManager::inst()->
value( "ui", "compacttrackbuttons" ).toInt()
? DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT
: DEFAULT_SETTINGS_WIDGET_WIDTH;
m_volumeKnob->move( settingsWidgetWidth - 2 * 24, 2 );
m_volumeKnob->setLabel( tr( "VOL" ) );
m_volumeKnob->show();

m_panningKnob = new Knob( knobSmall_17, getTrackSettingsWidget(),
tr( "Panning" ) );
m_panningKnob->setModel( &_t->m_panningModel );
m_panningKnob->setHintText( tr( "Panning:" ), "%" );
m_panningKnob->move( DEFAULT_SETTINGS_WIDGET_WIDTH-24, 2 );
m_panningKnob->move( settingsWidgetWidth - 24, 2 );
m_panningKnob->setLabel( tr( "PAN" ) );
m_panningKnob->show();

Expand Down

0 comments on commit 7713c9a

Please sign in to comment.