Style Sheet Loader: This plugin allows to load a Qt Style Sheet and apply it to Krita’s UI. The style sheet’s filepath can be remembered and automatically loaded on startup.
Loading an example stylesheet, before (regular UI):
After, with custom styling. (I didn’t have or make a proper stylesheet to test with, so this is just randomly-pasted-together example code. Sorry it looks so ugly!):
I’ll be sure to drop the Blender style I made in QSS for FreeCAD once I rework it. It has all sorts of bugfixes for FreeCAD’s UI in the template I used, but the FreeCAD devs are fixing those on their end, so I should be able to clean it up.
What’s the best way to modify a stylesheet and preview the results for Krita? Thusfar, I just used VS Code, but that can’t be the most efficient way.
Hello! freyalupen.
Thank you for create the plugin.
Since I had been tried and error some customize because I had a bit frustrated with the UI. Modify regarding color contrast and color scheme of UI elements,scroll bar color changing, tab design .
It’s also good to use with Theme creator extension.
THIS IS NOT ABOUT @freyalupen’s PLUGIN, IT IS ABOUT THE SOFTWARE BEHIND THE LINK FROM @Awez.
WARNING!!!
That software from “hustlei” you linked to, at least the Windows Executable, has 7 hits on VirusTotal.
It may be a false positive, because the reporting scanners are more or less unknown ones, but 7 hits is a VERY BIG WARNING-SIGN.
The Python version, which you can obtain as a ZIP archive, has no hits and should therefore be preferred.
Unfortunately, most people will opt for the executable version because they do not know how to use Python software.
It may be better to remove that link, to protect those who click on every link, and open every executable, without thinking about the consequences first!
Just removed the post, I apologize for any harm it may have caused. I was excited to see the post and wanted to contribute in some way, I never would’ve posted it if I had known there was a risk of malicious code in the Windows executable of it
I was curious to analyze the executable and although at first I also marked that it was recognized 7 times when I reanalyzed it now only had 5, possibly it is a false positive.
Added some lines to replace the string [path] with same as the qss file location.
At first I tried to make a gui option to select the images path, but I don’t really know what I’m doing and quickly got lost.
Interesting! Thinking about it, I figured there’s probably a more “proper” way to do this, and found it’s possible to add paths to Qt’s resource paths.
A little example script:
from krita import *
path = Application.getAppDataLocation()
QDir.setSearchPaths("stylesheet", [path])
qApp.setStyleSheet("""
QCheckBox::indicator:unchecked {
image: url(stylesheet:patterns/24-dynamic-screentone-B.png);
}
""")
So,
I’ve updated the plugin to set the stylesheet: path to the same folder as the style sheet by default.
(This way requires a colon at the end, so there’s no way to make it compatible with the [path] way.)
It would be possible to have multiple prefixes each with multiple paths, but the UIX of configuring that would take some thought. Plus it might be a bit more overcomplicated than necessary.
@freyalupen
I made a version of my style sheet-theme to work better with other dark color themes.
It’s using the same QPalette color labels as the theme creator plugin, together with a multiplier value:
border-color: QPalette.ButtonText(1.09)
background-color: QPalette.ToolTipBase(1.17, 0.40) // multiplier and alpha value
Used LLM chat bots to alter your script, to have it apply the colors by either multiplying the rgb values or multiplying the lightness in hsl values.
Should I share the altered script or would you prefer to implement it properly yourself?
(Alternatively I could share the output qss for various color themes instead.)