-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Track operations fixes and other stuff. #3878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1667,12 +1667,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 | ||
|
|
@@ -1795,14 +1789,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 ); | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -2713,6 +2710,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 && | ||
|
|
@@ -2745,7 +2748,7 @@ void TrackView::mousePressEvent( QMouseEvent * me ) | |
| { | ||
| m_action = MoveTrack; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To here.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested. Fixes the issue as expected.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Direct commit or PR?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Direct commit looks fine.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done via e8debf9. 👍 |
||
|
|
||
| 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 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks horizontal track resizing. I think this check should be moved to below.