Skip to content

Commit

Permalink
Turn off the Hand Cursor (#1916)
Browse files Browse the repository at this point in the history
We decided to go with the Hover Gesture instead, so turn off
the hand and work on hovers. Addresses #1752
  • Loading branch information
baconpaul authored May 19, 2020
1 parent 42df555 commit 03fb460
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 19 deletions.
3 changes: 2 additions & 1 deletion src/common/gui/CEffectSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ CMouseEventResult CEffectSettings::onMouseMoved(CPoint& where, const CButtonStat
isInside = true;
}
}
/*
if( isInside )
getFrame()->setCursor( VSTGUI::kCursorHand );
else
getFrame()->setCursor( VSTGUI::kCursorDefault );

*/

return kMouseEventHandled;
}
6 changes: 3 additions & 3 deletions src/common/gui/CLFOGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ CMouseEventResult CLFOGui::onMouseMoved(CPoint& where, const CButtonState& butto
{
if (rect_shapes.pointInside(where))
{
getFrame()->setCursor( VSTGUI::kCursorHand );
// getFrame()->setCursor( VSTGUI::kCursorHand );
}
else if (ss && lfodata->shape.val.i == ls_stepseq && (
rect_steps.pointInside(where) ||
Expand All @@ -1130,11 +1130,11 @@ CMouseEventResult CLFOGui::onMouseMoved(CPoint& where, const CButtonState& butto
rect_le.pointInside(where)
))
{
getFrame()->setCursor( VSTGUI::kCursorHand );
// getFrame()->setCursor( VSTGUI::kCursorHand );
}
else
{
getFrame()->setCursor( VSTGUI::kCursorDefault );
// getFrame()->setCursor( VSTGUI::kCursorDefault );
}
if (controlstate == cs_shape)
{
Expand Down
6 changes: 3 additions & 3 deletions src/common/gui/CModulationSourceButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ class CModulationSourceButton : public CCursorHidingControl
virtual VSTGUI::CMouseEventResult onMouseDown(VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override;

virtual VSTGUI::CMouseEventResult onMouseUp(VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override;
virtual VSTGUI::CMouseEventResult onMouseEntered (VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override {
getFrame()->setCursor( VSTGUI::kCursorHand );
virtual VSTGUI::CMouseEventResult onMouseEntered (VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override {
// getFrame()->setCursor( VSTGUI::kCursorHand );
return VSTGUI::kMouseEventHandled;
}
virtual VSTGUI::CMouseEventResult onMouseExited (VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override {
getFrame()->setCursor( VSTGUI::kCursorDefault );
// getFrame()->setCursor( VSTGUI::kCursorDefault );
return VSTGUI::kMouseEventHandled;
}

Expand Down
4 changes: 2 additions & 2 deletions src/common/gui/CNumberField.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ class CNumberField : public VSTGUI::CControl, public Surge::UI::SkinConsumingCom
virtual VSTGUI::CMouseEventResult onMouseMoved(VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override;

virtual VSTGUI::CMouseEventResult onMouseEntered (VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override {
getFrame()->setCursor( VSTGUI::kCursorHand );
// getFrame()->setCursor( VSTGUI::kCursorHand );
return VSTGUI::kMouseEventHandled;
}
virtual VSTGUI::CMouseEventResult onMouseExited (VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override {
getFrame()->setCursor( VSTGUI::kCursorDefault );
// getFrame()->setCursor( VSTGUI::kCursorDefault );
return VSTGUI::kMouseEventHandled;
}

Expand Down
6 changes: 3 additions & 3 deletions src/common/gui/COscillatorDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,16 +910,16 @@ CMouseEventResult COscillatorDisplay::onMouseMoved(CPoint& where, const CButtonS
{
if (rprev.pointInside(where) || rnext.pointInside(where) || rmenu.pointInside(where) )
{
getFrame()->setCursor( VSTGUI::kCursorHand );
// getFrame()->setCursor( VSTGUI::kCursorHand );
}
else
{
getFrame()->setCursor( VSTGUI::kCursorDefault );
// getFrame()->setCursor( VSTGUI::kCursorDefault );
}
}
else
{
getFrame()->setCursor( VSTGUI::kCursorDefault );
// getFrame()->setCursor( VSTGUI::kCursorDefault );
}

if (controlstate)
Expand Down
4 changes: 2 additions & 2 deletions src/common/gui/CSnapshotMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class CSnapshotMenu : public VSTGUI::COptionMenu, public Surge::UI::SkinConsumin
virtual bool canSave();

virtual VSTGUI::CMouseEventResult onMouseEntered (VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override {
getFrame()->setCursor( VSTGUI::kCursorHand );
// getFrame()->setCursor( VSTGUI::kCursorHand );
return VSTGUI::kMouseEventHandled;
}
virtual VSTGUI::CMouseEventResult onMouseExited (VSTGUI::CPoint& where, const VSTGUI::CButtonState& buttons) override {
getFrame()->setCursor( VSTGUI::kCursorDefault );
// getFrame()->setCursor( VSTGUI::kCursorDefault );
return VSTGUI::kMouseEventHandled;
}

Expand Down
8 changes: 6 additions & 2 deletions src/common/gui/CStatusPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,14 @@ VSTGUI::CMouseEventResult CStatusPanel::onMouseDown(VSTGUI::CPoint& where, const
}

VSTGUI::CMouseEventResult CStatusPanel::onMouseMoved(VSTGUI::CPoint& where, const VSTGUI::CButtonState& button) {
/*
** Restore once I have a hover strategy for this widget
if ( mpeBox.pointInside(where) || tuningBox.pointInside(where) || zoomBox.pointInside(where) )
getFrame()->setCursor( VSTGUI::kCursorHand );
getFrame()->setCursor( VSTGUI::kCursorHand );
else
getFrame()->setCursor( VSTGUI::kCursorDefault );
getFrame()->setCursor( VSTGUI::kCursorDefault );
*/

return kMouseEventHandled;
}
Expand Down
8 changes: 5 additions & 3 deletions src/common/gui/CSurgeSlider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ CMouseEventResult CSurgeSlider::onMouseDown(CPoint& where, const CButtonState& b
{
beginEdit();
controlstate = cs_drag;
getFrame()->setCursor( VSTGUI::kCursorHand );
// getFrame()->setCursor( VSTGUI::kCursorHand );
statezoom = 1.f;

edit_value = modmode ? &modval : &value;
Expand Down Expand Up @@ -601,7 +601,7 @@ CMouseEventResult CSurgeSlider::onMouseUp(CPoint& where, const CButtonState& but
#endif
endEdit();
controlstate = cs_none;
getFrame()->setCursor( VSTGUI::kCursorDefault );
// getFrame()->setCursor( VSTGUI::kCursorDefault );

edit_value = nullptr;

Expand Down Expand Up @@ -692,11 +692,13 @@ void CSurgeSlider::onMouseMoveDelta(CPoint& where,
{
handle_rect.offset(1, dispv);
}


/*
if( handle_rect.pointInside(where) )
getFrame()->setCursor( VSTGUI::kCursorHand );
else
getFrame()->setCursor( VSTGUI::kCursorDefault );
*/
}

if ((controlstate == cs_drag) && (buttons & kLButton))
Expand Down

0 comments on commit 03fb460

Please sign in to comment.