diff --git a/data/themes/classic/cursor_knife.png b/data/themes/classic/cursor_knife.png deleted file mode 100644 index 8ddbd3ac4..000000000 Binary files a/data/themes/classic/cursor_knife.png and /dev/null differ diff --git a/data/themes/classic/hand.png b/data/themes/classic/hand.png deleted file mode 100644 index 561997193..000000000 Binary files a/data/themes/classic/hand.png and /dev/null differ diff --git a/data/themes/classic/style.css b/data/themes/classic/style.css index a0fb48209..d5ebfc8d2 100644 --- a/data/themes/classic/style.css +++ b/data/themes/classic/style.css @@ -734,10 +734,6 @@ lmms--gui--TimeLineWidget { qproperty-barLineColor: rgb( 192, 192, 192 ); qproperty-barNumberColor: rgb( 192, 192, 192 ); - - /* Cursor hotspots for loop marker adjustment */ - qproperty-mouseHotspotSelLeft: 0px 16px; - qproperty-mouseHotspotSelRight: 32px 16px; } QTreeView { @@ -762,10 +758,6 @@ lmms--gui--ClipView { qproperty-textShadowColor: rgb( 0, 0, 0 ); qproperty-gradient: true; /* boolean property, set true to have a gradient */ qproperty-markerColor: rgb(0, 0, 0); - /* finger tip offset of cursor */ - qproperty-mouseHotspotHand: 3px 3px; - qproperty-mouseHotspotKnife: 0px 0px; - font-size: 11px; } diff --git a/data/themes/default/cursor_knife.png b/data/themes/default/cursor_knife.png deleted file mode 100644 index 591df2d62..000000000 Binary files a/data/themes/default/cursor_knife.png and /dev/null differ diff --git a/data/themes/default/hand.png b/data/themes/default/hand.png deleted file mode 100644 index c6d9a0789..000000000 Binary files a/data/themes/default/hand.png and /dev/null differ diff --git a/data/themes/default/style.css b/data/themes/default/style.css index f78df0982..a1a75a41d 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -799,10 +799,6 @@ lmms--gui--TimeLineWidget { qproperty-barLineColor: rgb( 192, 192, 192 ); qproperty-barNumberColor: rgb( 192, 192, 192 ); - - /* Cursor hotspots for loop marker adjustment */ - qproperty-mouseHotspotSelLeft: 0px 16px; - qproperty-mouseHotspotSelRight: 32px 16px; } lmms--gui--TrackContainerView QLabel @@ -823,10 +819,6 @@ lmms--gui--ClipView { qproperty-textShadowColor: rgba(0,0,0,200); qproperty-gradient: false; /* boolean property, set true to have a gradient */ qproperty-markerColor: rgb(0, 0, 0); - /* finger tip offset of cursor */ - qproperty-mouseHotspotHand: 7px 2px; - qproperty-mouseHotspotKnife: 0px 0px; - font-size: 11px; } diff --git a/include/ClipView.h b/include/ClipView.h index 5c1518043..6e6ca4d66 100644 --- a/include/ClipView.h +++ b/include/ClipView.h @@ -62,10 +62,6 @@ class ClipView : public selectableObject, public ModelView Q_PROPERTY( QColor patternClipBackground READ patternClipBackground WRITE setPatternClipBackground ) Q_PROPERTY( bool gradient READ gradient WRITE setGradient ) Q_PROPERTY(QColor markerColor READ markerColor WRITE setMarkerColor) - // We have to use a QSize here because using QPoint isn't supported. - // width -> x, height -> y - Q_PROPERTY( QSize mouseHotspotHand MEMBER m_mouseHotspotHand ) - Q_PROPERTY( QSize mouseHotspotKnife MEMBER m_mouseHotspotKnife ) public: const static int BORDER_WIDTH = 2; @@ -223,11 +219,6 @@ private: QColor m_patternClipBackground; bool m_gradient; QColor m_markerColor; - QSize m_mouseHotspotHand; // QSize must be used because QPoint - QSize m_mouseHotspotKnife; // isn't supported by property system - QCursor m_cursorHand; - QCursor m_cursorKnife; - bool m_cursorSetYet; bool m_needsUpdate; inline void setInitialPos( QPoint pos ) diff --git a/plugins/AudioFileProcessor/AudioFileProcessorView.cpp b/plugins/AudioFileProcessor/AudioFileProcessorView.cpp index 6a809b31e..0658dc651 100644 --- a/plugins/AudioFileProcessor/AudioFileProcessorView.cpp +++ b/plugins/AudioFileProcessor/AudioFileProcessorView.cpp @@ -51,7 +51,7 @@ AudioFileProcessorView::AudioFileProcessorView(Instrument* instrument, InstrumentViewFixedSize(instrument, parent) { m_openAudioFileButton = new PixmapButton(this); - m_openAudioFileButton->setCursor(QCursor(Qt::PointingHandCursor)); + m_openAudioFileButton->setCursor(Qt::PointingHandCursor); m_openAudioFileButton->move(227, 72); m_openAudioFileButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap( "select_file")); diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index 859dd2773..19947eb17 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -914,7 +914,7 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren // File Button m_fileDialogButton = new PixmapButton( this ); - m_fileDialogButton->setCursor( QCursor( Qt::PointingHandCursor ) ); + m_fileDialogButton->setCursor(Qt::PointingHandCursor); m_fileDialogButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fileselect_on" ) ); m_fileDialogButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fileselect_off" ) ); m_fileDialogButton->move( 223, 68 ); @@ -925,7 +925,7 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren // Patch Button m_patchDialogButton = new PixmapButton( this ); - m_patchDialogButton->setCursor( QCursor( Qt::PointingHandCursor ) ); + m_patchDialogButton->setCursor(Qt::PointingHandCursor); m_patchDialogButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "patches_on" ) ); m_patchDialogButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "patches_off" ) ); m_patchDialogButton->setEnabled( false ); diff --git a/plugins/Patman/Patman.cpp b/plugins/Patman/Patman.cpp index 7c2800287..589c3559f 100644 --- a/plugins/Patman/Patman.cpp +++ b/plugins/Patman/Patman.cpp @@ -442,7 +442,7 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : m_openFileButton = new PixmapButton( this, nullptr ); m_openFileButton->setObjectName( "openFileButton" ); - m_openFileButton->setCursor( QCursor( Qt::PointingHandCursor ) ); + m_openFileButton->setCursor(Qt::PointingHandCursor); m_openFileButton->move( 227, 86 ); m_openFileButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "select_file_on" ) ); diff --git a/plugins/Sf2Player/Sf2Player.cpp b/plugins/Sf2Player/Sf2Player.cpp index 25e7b2f51..d50c7f7d4 100644 --- a/plugins/Sf2Player/Sf2Player.cpp +++ b/plugins/Sf2Player/Sf2Player.cpp @@ -963,7 +963,7 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren // File Button m_fileDialogButton = new PixmapButton(this); - m_fileDialogButton->setCursor(QCursor(Qt::PointingHandCursor)); + m_fileDialogButton->setCursor(Qt::PointingHandCursor); m_fileDialogButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("fileselect_on")); m_fileDialogButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("fileselect_off")); m_fileDialogButton->move(217, 107); @@ -974,7 +974,7 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren // Patch Button m_patchDialogButton = new PixmapButton(this); - m_patchDialogButton->setCursor(QCursor(Qt::PointingHandCursor)); + m_patchDialogButton->setCursor(Qt::PointingHandCursor); m_patchDialogButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("patches_on")); m_patchDialogButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("patches_off")); m_patchDialogButton->setEnabled(false); diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index 2faf74064..c52f9077c 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -49,7 +49,7 @@ AutomatableModelView::AutomatableModelView( Model* model, QWidget* _this ) : m_conversionFactor( 1.0 ) { widget()->setAcceptDrops( true ); - widget()->setCursor( QCursor( embed::getIconPixmap( "hand" ), 3, 3 ) ); + widget()->setCursor(Qt::PointingHandCursor); } void AutomatableModelView::addDefaultActions( QMenu* menu ) diff --git a/src/gui/clips/ClipView.cpp b/src/gui/clips/ClipView.cpp index 4b9d8dbc3..5e92e661f 100644 --- a/src/gui/clips/ClipView.cpp +++ b/src/gui/clips/ClipView.cpp @@ -96,11 +96,6 @@ ClipView::ClipView( Clip * clip, m_patternClipBackground( 0, 0, 0 ), m_gradient( true ), m_markerColor(0, 0, 0), - m_mouseHotspotHand( 0, 0 ), - m_mouseHotspotKnife( 0, 0 ), - m_cursorHand( QCursor( embed::getIconPixmap( "hand" ) ) ), - m_cursorKnife( QCursor( embed::getIconPixmap( "cursor_knife" ) ) ), - m_cursorSetYet( false ), m_needsUpdate( true ) { if( s_textFloat == nullptr ) @@ -111,7 +106,7 @@ ClipView::ClipView( Clip * clip, setAttribute( Qt::WA_DeleteOnClose, true ); setFocusPolicy( Qt::StrongFocus ); - setCursor( m_cursorHand ); + setCursor(Qt::PointingHandCursor); move( 0, 0 ); show(); @@ -167,14 +162,6 @@ ClipView::~ClipView() */ void ClipView::update() { - if( !m_cursorSetYet ) - { - m_cursorHand = QCursor( embed::getIconPixmap( "hand" ), m_mouseHotspotHand.width(), m_mouseHotspotHand.height() ); - m_cursorKnife = QCursor( embed::getIconPixmap( "cursor_knife" ), m_mouseHotspotKnife.width(), m_mouseHotspotKnife.height() ); - setCursor( m_cursorHand ); - m_cursorSetYet = true; - } - if( fixedClips() ) { updateLength(); @@ -504,10 +491,10 @@ void ClipView::updateCursor(QMouseEvent * me) // If we are in the middle on knife mode, use the knife cursor else if (m_trackView->trackContainerView()->knifeMode() && !isSelected()) { - setCursor(m_cursorKnife); + setCursor(Qt::SplitHCursor); } // If we are in the middle in any other mode, use the hand cursor - else { setCursor(m_cursorHand); } + else { setCursor(Qt::PointingHandCursor); } } @@ -681,7 +668,7 @@ void ClipView::mousePressEvent( QMouseEvent * me ) else if (knifeMode) { m_action = Action::Split; - setCursor( m_cursorKnife ); + setCursor(Qt::SplitHCursor); setMarkerPos( knifeMarkerPos( me ) ); setMarkerEnabled( true ); update(); @@ -996,7 +983,7 @@ void ClipView::mouseMoveEvent( QMouseEvent * me ) } else if( m_action == Action::Split ) { - setCursor(m_cursorKnife); + setCursor(Qt::SplitHCursor); setMarkerPos(knifeMarkerPos(me)); update(); } diff --git a/src/gui/tracks/FadeButton.cpp b/src/gui/tracks/FadeButton.cpp index 386b5be41..ae1df1eca 100644 --- a/src/gui/tracks/FadeButton.cpp +++ b/src/gui/tracks/FadeButton.cpp @@ -47,7 +47,7 @@ FadeButton::FadeButton(const QColor & _normal_color, m_activatedColor( _activated_color ), m_holdColor( holdColor ) { - setCursor(QCursor(embed::getIconPixmap("hand"), 3, 3)); + setCursor(Qt::PointingHandCursor); setFocusPolicy(Qt::NoFocus); activeNotes = 0; } diff --git a/src/gui/tracks/TrackLabelButton.cpp b/src/gui/tracks/TrackLabelButton.cpp index 88020b410..b8dcc333b 100644 --- a/src/gui/tracks/TrackLabelButton.cpp +++ b/src/gui/tracks/TrackLabelButton.cpp @@ -47,7 +47,7 @@ TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) : { setAcceptDrops( true ); setFocusPolicy(Qt::NoFocus); - setCursor( QCursor( embed::getIconPixmap( "hand" ), 3, 3 ) ); + setCursor(Qt::PointingHandCursor); setToolButtonStyle( Qt::ToolButtonTextBesideIcon ); m_renameLineEdit = new TrackRenameLineEdit( this ); diff --git a/src/gui/tracks/TrackOperationsWidget.cpp b/src/gui/tracks/TrackOperationsWidget.cpp index 17144fdb6..d6ddc7027 100644 --- a/src/gui/tracks/TrackOperationsWidget.cpp +++ b/src/gui/tracks/TrackOperationsWidget.cpp @@ -90,6 +90,7 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) : m_trackOps->setFocusPolicy( Qt::NoFocus ); m_trackOps->setMenu( toMenu ); m_trackOps->setToolTip(tr("Actions")); + m_trackOps->setCursor(Qt::PointingHandCursor); m_muteBtn = new AutomatableButton(operationsWidget, tr("Mute")); m_muteBtn->setCheckable(true);