Hi there! Currently continuing work for the UI redesign, as I think it would be really cool to have a newer version working for Krita 5.0. However, I’m stumped regarding one particular thing: the separator lines in the layer docker. I think the separation really hinders the cleanliness in that particular case, but it’s been tricky to actually remove the lines.
Here’s what I’m talking about, with a before and (hopefully) after:
I’ve been looking into the source code, since I’m fairly certain that the elements are injected in run-time. However, I could not find the parts of the code that would be responsible for the UI aspect. I looked into Layerbox.cpp, but couldn’t find the right file.
Could someone from the dev team / someone who might know give me a pointer as to where to look more closely? Thanks in advance!
I don’t really know enough about how the code works to definitively answer that myself, sorry.
By the way, in case this pertains to your plugin, most of the nonflat textless buttons you see in 5.0 have been flattened in 5.1 (with KToolButton’s autoraise property).
This might be off topic, but there were discussions here on the forum for adding more information like blend modes and opacity percentages à la CSP. if you are looking for contributing to the core Krita may be this would be good to have.
Just saw what you meant, looks quite a lot better than the default version. I already did some of the changes “manually” in the Redesign, but it’s always better when the base Krita looks better Thanks for you contribution!
Yeah, this would most likely have to be done in native Krita. I at least have no idea how to do something like this in PyQT. It’s an interesting proposition I already took a look at it, but I’m horrible at multitasking, so if I do end up taking on this task, it will probably be after the redesign UI is mostly finished.
In NodeDelegate.cpp, inside NodeDelegate::drawIcons function, if you change the line p->setPen(scm.gridColor(option, d->view)); to p->setPen(Qt::transparent); then those lines dissapear.
So, yes, it is hardcoded, and cannot be changed from python I guess.
The layer docker is a delicate thing (I’m sure anyone has their own opinion on how it should be improved), so maybe it is better to have a dedicated dynamic thread where opinions are given and a mockup is constantly being updated. Then, when the community arrives to a consensus (sort of), the changes can be proposed in a consistent way and be put into krita.
With regards to that thread, I also recently proposed there to be a button on filter layers so you can double click to access the properties of such layers in this topic: Double click on layer filter mask to edit settings? - #4 by Hologram, which could be taken into consideration as well.
yes, it looks like qRgba(r, g, b, a=0) works nicely, as replacement for qRgb(r, g, b)
it’s just little bit strange how uint should work when returned from def styleHint(...) -> int
From Qt:s documentation…
typedef QRgb
An ARGB quadruplet on the format #AARRGGBB, equivalent to an unsigned int.
The type also holds a value for the alpha-channel. The default alpha channel is ff, i.e opaque. For more information, see the Alpha-Blended Drawing section.
alpha value FF should be opaque, but 00 must be sent from python to avoid value error.
(editing code to use qRgba(), it’s bit better, but still feels wrong )
/AkiR
Where are node delegates used? I did a short test on a compiled version of Krita, and it works as expected, but I don’t want to accidentally cause a regression elsewhere.
@Lynx3d I see. Then maybe I could make a small test and open a merge request? It’s basically what people told, and I’ll put the image of the image after. It’s not going to be the extensive layers redesign, but it’s a step in the right direction