Skip to content

Make long-presses behave better

  1. Sliders now enter edit mode when double-clicking, not long-pressing – BUG:471473
  2. Long-press now summons context menus instead of making a right-click – BUG:506042 and BUG:510229
  3. General settings, Miscellaneous tab now lets you toggle long-pressing on any platform.

None of these are Android-specific.

I don't feel bad about changing the slider behavior like this because it seems like users (including me) only ever activated it accidentally when trying to make small adjustments to a slider. It's also apparently so obscure that not even Dmitry knew the behavior existed.

Some known issues with long-pressing are still present: kinetic scrolling blocks the left-click causing a lot of delay, Android still offers to "Select All" on sliders, some widgets get mildly confused at not receiving a mouse release before the context menu pops up. It fixes a slew of issues already though, so I think it makes sense to merge it in this state instead of letting it build up conflicts just because it hasn't attained Nirvana yet.

Manual MR: documentation/docs-krita-org!368 (merged)

Test Plan

  1. Press and hold on a slider. Observe that it no longer enters edit mode.
  2. Double-click on a slider. Observe that it enters edit mode.
  3. Enable long-press to open context menus in the Miscellaneous tab of the General settings. Long-press on a layer or a brush. Observe that a context menu appears.
  4. Open the pop-up palette, press and hold on its color wheel. Observe that it doesn't close on you anymore.
  5. Disable the setting, observe that long-pressing doesn't make a context menu appear.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
  • Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Edited by Carsten Hartenfels

Merge request reports

Loading