Skip to content

Commit

Permalink
Remove trailing tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
M374LX committed Nov 29, 2020
1 parent 5b133e6 commit c54bca0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions include/TrackContentObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class LMMS_EXPORT TrackContentObject : public Model, public JournallingObject
{
return m_autoResize;
}

QColor color() const
{
return m_color;
Expand All @@ -117,11 +117,11 @@ class LMMS_EXPORT TrackContentObject : public Model, public JournallingObject
{
m_color = c;
}

bool hasColor();

void useCustomClipColor( bool b );

bool usesCustomClipColor()
{
return m_useCustomClipColor;
Expand All @@ -147,7 +147,7 @@ class LMMS_EXPORT TrackContentObject : public Model, public JournallingObject

TimePos startTimeOffset() const;
void setStartTimeOffset( const TimePos &startTimeOffset );

void updateColor();

// Will copy the state of a TCO to another TCO
Expand Down
4 changes: 2 additions & 2 deletions include/TrackContentObjectView.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ class TrackContentObjectView : public selectableObject, public ModelView
// some metadata to be written to the clipboard.
static void remove( QVector<TrackContentObjectView *> tcovs );
static void toggleMute( QVector<TrackContentObjectView *> tcovs );

QColor getColorForDisplay( QColor );

public slots:
virtual bool close();
void remove();
void update() override;

void changeClipColor();
void useTrackColor();

Expand Down
4 changes: 2 additions & 2 deletions src/gui/TrackContentObjectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void TrackContentObjectView::changeClipColor()
QColor new_color = ColorChooser( this ).withPalette( ColorChooser::Palette::Track )->getColor( m_tco->color() );
if( ! new_color.isValid() )
{ return; }

// Use that color
m_tco->setColor( new_color );
m_tco->useCustomClipColor( true );
Expand Down Expand Up @@ -1235,7 +1235,7 @@ QColor TrackContentObjectView::getColorForDisplay( QColor defaultColor )
c = tcoColor;
}
}

// Return color to caller
return c;
}
Expand Down
6 changes: 3 additions & 3 deletions src/gui/TrackView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ TrackView::TrackView( Track * track, TrackContainerView * tcv ) :

connect( &m_track->m_soloModel, SIGNAL( dataChanged() ),
m_track, SLOT( toggleSolo() ), Qt::DirectConnection );

connect( &m_trackOperationsWidget, SIGNAL( colorChanged( QColor & ) ),
m_track, SLOT( trackColorChanged( QColor & ) ) );

connect( &m_trackOperationsWidget, SIGNAL( colorReset() ),
m_track, SLOT( trackColorReset() ) );

// create views for already existing TCOs
for( Track::tcoVector::iterator it =
m_track->m_trackContentObjects.begin();
Expand Down
14 changes: 7 additions & 7 deletions src/gui/widgets/TrackOperationsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
m_trackView->trackContainerView(),
SLOT( deleteTrackView( TrackView * ) ),
Qt::QueuedConnection );

connect( m_trackView->getTrack()->getMutedModel(), SIGNAL( dataChanged() ),
this, SLOT( update() ) );

}


Expand Down Expand Up @@ -170,9 +170,9 @@ void TrackOperationsWidget::mousePressEvent( QMouseEvent * me )
void TrackOperationsWidget::paintEvent( QPaintEvent * pe )
{
QPainter p( this );

p.fillRect( rect(), palette().brush(QPalette::Background) );

if( m_trackView->getTrack()->useColor() && ! m_trackView->getTrack()->getMutedModel()->value() )
{
QRect coloredRect( 0, 0, 10, m_trackView->getTrack()->getHeight() );
Expand Down Expand Up @@ -237,12 +237,12 @@ void TrackOperationsWidget::changeTrackColor()
{
QColor new_color = ColorChooser( this ).withPalette( ColorChooser::Palette::Track )-> \
getColor( m_trackView->getTrack()->color() );

if( ! new_color.isValid() )
{ return; }

emit colorChanged( new_color );

Engine::getSong()->setModified();
update();
}
Expand Down Expand Up @@ -308,7 +308,7 @@ void TrackOperationsWidget::updateMenu()
toMenu->addAction( tr( "Turn all recording on" ), this, SLOT( recordingOn() ) );
toMenu->addAction( tr( "Turn all recording off" ), this, SLOT( recordingOff() ) );
}

toMenu->addSeparator();
toMenu->addAction( embed::getIconPixmap( "colorize" ),
tr( "Change color" ), this, SLOT( changeTrackColor() ) );
Expand Down

0 comments on commit c54bca0

Please sign in to comment.