Color labels shown in timeline.
TimelineFramesModel can now tell index of layer's color label.
Details
- Reviewers
dkazakov - Maniphest Tasks
- T3500: Layer color labels in the timeline
- Commits
- R37:568c9786db76: Show layer color labels in the timeline
Diff Detail
- Repository
- R37 Krita
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Hi, @WhaleKit!
There is still a problem with painting the selection border over the colored item. A 1px colored line leaks through the selection border :) And I'm not sure if it is Linux specific bug, because your screenshots don't include a selected colored item :)
Codewise, the patch looks perfectly fine, except of a small Windows/Linux filenaming issue, which can be fixed with this small patch:
Hi, @dkazakov!
Thank you for pointing at this flaw! It could be seen on windows too. Now, I believe I fixed it
Hi, @WhaleKit!
I have tested the patch. It looks nice, the bottom line is still a bit colored, but yes, as you said, we probably cannot do much about it without rewriting the drawControl(QStyle::CE_Header,...) entirely. One thing I found is that we can probably avoid forking of the QStyle by just returning a different background color from the model. Could you check this small hacky patch on Windows (on the top of your patch)?
A far as I can tell, returning a different color does the same thing as forking of paintSection(). At least here on Linux. If it works fine on Windows as well, I guess we should better stick to this approach and forget about that colored line that is still painted at the bottom :)
@dkazakov This approach using BackgroundRole is way more neat and works as well (on win8.1 at least). So, yeah, we totally should use it.