obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

UI: Refactor / Clean up addNudge

Open gxalpha opened this issue 2 years ago • 0 comments

Description

Refactors how nudges are registered by using a lambda instead of separate slot functions. Significantly cuts down on code.

Motivation and Context

About a year ago when reviewing #6326 Jim mentioned that this should probably get cleaned up. I stumbled across this code again and remembered that.

How Has This Been Tested?

macOS 13.2 Tested nudging in all directions, both with and without shift.

Types of changes

  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [x] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [x] I have included updates to all appropriate documentation.

gxalpha avatar Feb 12 '23 21:02 gxalpha