Page MenuHome

UI: Set X Move Cursor for Slider Button
Needs ReviewPublic

Authored by Hans Goudey (HooglyBoogly) on Aug 5 2020, 8:07 PM.

Details

Reviewers
Julian Eisel (Severin)
Group Reviewers
User Interface
Summary

We set the move cursor for normal buttons to indicate that you can click-drag to slide the value.

This is more true for sliders, where that is their main purpose. So we should use the move cursor for them too.

Diff Detail

Repository
rB Blender
Branch
slider-change-cursor (branched from master)
Build Status
Buildable 9369
Build 9369: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Aug 5 2020, 8:07 PM
Hans Goudey (HooglyBoogly) created this revision.
Julian Eisel (Severin) requested changes to this revision.Aug 6 2020, 1:02 PM

There's a small issue: After dragging, the cursor is reset until the next mouse-move happens. Other buttons address this by also setting the cursor in button_activate_init(). Would be preferable not having to do that there, but not sure how else we could go about this.

source/blender/editors/interface/interface_handlers.c
8105–8107

I'd prefer not having to hardcode the cases that need cursor resetting here. We can just set data->changed_cursor instead, it's reset automatically on exit then.
We could have a simple utility function for this, say button_activate_modal_cursor().

This revision now requires changes to proceed.Aug 6 2020, 1:02 PM
  • Fix cursor state issues, add helper function
Hans Goudey (HooglyBoogly) marked an inline comment as done.Aug 6 2020, 6:09 PM
  • Merge branch 'master' into slider-change-cursor