Skip to content

Refactor thumbnail code so it shared thumbnail generation

The main goal of this is to have shared logic with how the thumbnails get generated as a resource. Right now if you modify it at all...the results of the thumbnail do not show across all areas. See current issue with non-shared code.

thumbnail-change

The resource manager is using one way...and the kis_preset_chooser was using a different way.

In addition I did a few other tweaks

  • in the preset chooser - I am vertically centering the text better then how it was
  • in the preset chooser - Since we aren't showing the brush size right now in list view, I am moving the text over a bit so we don't have empty space

I tried to share as much as I could, but certain things we can't share since the kis_preset_chooser has multiple views, and the thumbnail generator only controls what the thumbnail looks like.

Test Plan

Made selections between the list view and thumbnail view. Tried high dpi and non high dpi to see if that made a difference. Things seems to be showing up ok

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 Scott Petrovic

Merge request reports