Track operations fixes and other stuff. (#3878)

This commit is contained in:
Hussam Eddin Alhomsi
2017-11-15 07:30:17 +03:00
committed by Tres Finocchiaro
parent 77b4985a2d
commit 6f305a6308
6 changed files with 22 additions and 27 deletions

View File

@@ -320,7 +320,7 @@ TrackOperationsWidget > QPushButton {
min-height: 26px;
min-width: 26px;
background: none;
border:none;
border: none;
}
TrackOperationsWidget > QPushButton::menu-indicator {
@@ -328,20 +328,18 @@ TrackOperationsWidget > QPushButton::menu-indicator {
subcontrol-origin: padding;
subcontrol-position: center;
position: relative;
top: 2px;
top: 1px;
}
TrackOperationsWidget > QPushButton::menu-indicator:hover {
image: url(resources:trackop_h.png);
}
TrackOperationsWidget > QPushButton::menu-indicator:pressed,
TrackOperationsWidget > QPushButton::menu-indicator:checked
{
TrackOperationsWidget > QPushButton::menu-indicator:checked {
image: url(resources:trackop_c.png);
position: relative;
top: 3px;
top: 2px;
}
/* actually has no effect yet so disabled */

View File

@@ -320,20 +320,14 @@ TrackOperationsWidget > QPushButton::menu-indicator {
subcontrol-origin: padding;
subcontrol-position: center;
position: relative;
top: 2px;
top: 1px;
}
TrackOperationsWidget > QPushButton::menu-indicator:hover {
image: url(resources:trackop_h.png);
}
TrackOperationsWidget > QPushButton::menu-indicator:pressed,
TrackOperationsWidget > QPushButton::menu-indicator:checked
{
image: url(resources:trackop_c.png);
TrackOperationsWidget > QPushButton::menu-indicator:checked {
image: url(resources:trackop.png);
position: relative;
top: 3px;
top: 2px;
}
/* font sizes */

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

View File

@@ -1702,12 +1702,6 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
QWidget( parent ), /*!< The parent widget */
m_trackView( parent ) /*!< The parent track view */
{
if( s_grip == NULL )
{
s_grip = new QPixmap( embed::getIconPixmap(
"track_op_grip" ) );
}
ToolTip::add( this, tr( "Press <%1> while clicking on move-grip "
"to begin a new drag'n'drop-action." ).arg(
#ifdef LMMS_BUILD_APPLE
@@ -1830,14 +1824,17 @@ void TrackOperationsWidget::paintEvent( QPaintEvent * pe )
if( m_trackView->isMovingTrack() == false )
{
s_grip = new QPixmap( embed::getIconPixmap(
"track_op_grip" ) );
p.drawPixmap( 2, 2, *s_grip );
m_trackOps->show();
m_muteBtn->show();
}
else
{
m_trackOps->hide();
m_muteBtn->hide();
s_grip = new QPixmap( embed::getIconPixmap(
"track_op_grip_c" ) );
p.drawPixmap( 2, 2, *s_grip );
}
}
@@ -2748,6 +2745,12 @@ void TrackView::dropEvent( QDropEvent * de )
*/
void TrackView::mousePressEvent( QMouseEvent * me )
{
if( me->x()>10 ) // 10 = The width of the grip + 2 pixels to the left and right.
{
QWidget::mousePressEvent( me );
return;
}
// If previously dragged too small, restore on shift-leftclick
if( height() < DEFAULT_TRACK_HEIGHT &&
me->modifiers() & Qt::ShiftModifier &&
@@ -2780,7 +2783,7 @@ void TrackView::mousePressEvent( QMouseEvent * me )
{
m_action = MoveTrack;
QCursor c( Qt::SizeAllCursor );
QCursor c( Qt::SizeVerCursor );
QApplication::setOverrideCursor( c );
// update because in move-mode, all elements in
// track-op-widgets are hidden as a visual feedback