Made the widget KisResourceItemChooser support narrow horizontal layout
GUI: Made the widget KisResourceItemChooser
support narrow horizontal layout
Some users wanted to position the Brush Presets docker above the canvas to act like a toolbar. The standard vertical layout positions the brush tag filter and brush name filter above and below the brush presets view, creating wasted vertical space, when docking above the canvas. The horizontal layout by contrast positions the brush tag filter and brush name filter to the sides of the brush presets view.
To enable the brush presets docker to perform the change from vertical to
horizontal layout the underlying KisResourceItemChooser
had to be modified.
The switch from vertical to horizontal layout happens when the docker has
height less than 100px (up for debate).
libs/ui/forms/wdgpaintoppresets.ui
had to be adjusted to allow a minimum
docker height of 33px (the same size as filter widgets).
This is my first contribution.
Test Plan
Go to Settings -> Docker -> Brush Presets
detach the docker into a window and dock it above the canvas shrink the dcoker to less than 100px in height.
I used QSplitter
to enable resizing of the elements in case users need to type something longer in the filter inputs.
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.
/"Needs review"