Fix track operations widget vertical alignment (#7765)

In #7708, the track operations widget was given a centered vertical alignment in order to fix an aesthetic layout issue. This is being reverted, since it is possible to resize tracks, and all the other track interface elements are top-aligned.
This commit is contained in:
Fawn
2025-03-13 11:12:33 -06:00
committed by GitHub
parent 768b3b253b
commit 91f750d2c2

View File

@@ -83,7 +83,7 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
// buttons in a layout.
auto operationsWidget = new QWidget(this);
auto operationsLayout = new QHBoxLayout(operationsWidget);
operationsLayout->setContentsMargins(0, 0, 0, 0);
operationsLayout->setContentsMargins(0, 3, 0, 0);
operationsLayout->setSpacing(2);
m_trackOps = new QPushButton(operationsWidget);
@@ -131,7 +131,7 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
operationsLayout->addWidget(muteWidget);
operationsLayout->addWidget(soloWidget);
layout->addWidget(operationsWidget, 0, Qt::AlignCenter | Qt::AlignLeading);
layout->addWidget(operationsWidget, 0, Qt::AlignTop | Qt::AlignLeading);
connect( this, SIGNAL(trackRemovalScheduled(lmms::gui::TrackView*)),
m_trackView->trackContainerView(),
@@ -145,11 +145,6 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
}
/*! \brief Respond to trackOperationsWidget mouse events
*
* If it's the left mouse button, and Ctrl is held down, and we're
@@ -180,8 +175,6 @@ void TrackOperationsWidget::mousePressEvent( QMouseEvent * me )
}
/*!
* \brief Repaint the trackOperationsWidget
*
@@ -222,17 +215,9 @@ bool TrackOperationsWidget::confirmRemoval()
mb.setCheckBox(askAgainCheckBox);
mb.setDefaultButton(QMessageBox::Cancel);
int answer = mb.exec();
if( answer == QMessageBox::Ok )
{
return true;
}
return false;
return mb.exec() == QMessageBox::Ok;
}
/*! \brief Clone this track
*
*/
@@ -270,7 +255,6 @@ void TrackOperationsWidget::clearTrack()
}
/*! \brief Remove this track from the track list
*
*/
@@ -324,6 +308,7 @@ void TrackOperationsWidget::resetClipColors()
Engine::getSong()->setModified();
}
/*! \brief Update the trackOperationsWidget context menu
*
* For all track types, we have the Clone and Remove options.
@@ -390,7 +375,6 @@ void TrackOperationsWidget::toggleRecording( bool on )
}
void TrackOperationsWidget::recordingOn()
{
toggleRecording( true );