Add Style Preset to Text Property Docker
This adds style presets to the text property docker. This is the final piece necessary for phase 2 to complete, as asking for artists to remember all 50+ properties as well as which is their favourite is unworkable.
This introduces tree-index to allow only editing properties on the index of which the properties are the actual resource. This way, we can show our text in a context of other text.
Resources basics:
-
Can import resource (Almost, but a problem: when the folder doesn't exist, it doesn't import, did I forget a place to add?) -
Can remove resource. -
Can create new resource. -
Can edit existing resource. -
Tag resource. -
Untag resource. -
Can add resource to bundle (???) -
Resource displays linked resources correctly? (???)
UI issues:
-
No preview in edit, should have one... -
Sample Text should be editable. -
Changing property mode is weird. -
Figure out what to do about stroke and fill. (They're removed right now...) -
Handle problem with resolved font-size. -
Store resolution and resize properties as needed. - Text property issues:
-
Fix Axis model. -
Fix styles model. -
Fix DPI -
Fix auto enabler. -
Fix text decoration color. -
Fix whatever is making it so slow...
-
- Style presets view:
-
Fix Wobbly addResource layout. -
Remove unnecessary padding. -
Make SVG sample preview look better. -
Fix color in SVG sample preview.
-
Test Plan
- Copy the contents of this zip into your resource folder (including folder name!) css_styles.zip, also install Junicode VF for the lombardic and italic garamond styles and IBM VGA 8x16 for the pixelart sample (though, I am seeing they renamed the font
🙃 ) - Startup Krita, make doc.
- Create a text.
- Go into text properties docker and go to 'preset' tab to find the style presets.
- Double click them to use on the given selection.
You can also create, edit and clone presets. I've currently set it up so that the preset reloads when cancelling editing, though I think we could use dirty presets here somehow.
see also: woltherav/krita#35 (closed)
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.
