Skip to content

Fix drawing mypaint shade selector

Three changes:

  • make the ratios of changes in stripes relative to min(width, height), so now stretching the MyPaint shade selector horizontally will just extend the horizontal stripe, not stretch it
  • draw the MyPaint shade selector in high resolution on High DPI displays
  • fix the antialiasing of the inner circle (remove the ugly edge)

MyPaint_comparison_007_rgb (on this file actually an ugly edge is present, but it's caused by the fact that the dummy signed here was checking it and making screenshots in CMYK mode instead of RGB :D so blending looked a bit different. But I promise it works just the same in RGB, just with better anti-aliasing, as shown on the next picture) MyPaint_ugly_edge_demonstration_002

Test Plan

  1. Open Krita.
  2. Play around with the size of the docker, making sure you have MyPaint shade selector.
  3. See the MyPaint shade selector on High DPI display (for example 4K) with 2x and 1.5x UI scaling.
  4. Compare the shade selector with the same color selected (I suggest some desaturated one, for example #a8c2dd). If you don't see the difference, make a screenshot of before and after and zoom in on the screenshot; you'll see that before there was an ugly edge that disappeared in the newer one.

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.
Edited by Agata Cacko

Merge request reports