Conversation
…into icon-color
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (88.52%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #277 +/- ##
==========================================
- Coverage 99.78% 99.42% -0.37%
==========================================
Files 31 31
Lines 1851 1903 +52
==========================================
+ Hits 1847 1892 +45
- Misses 4 11 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@brisvag, I think the main reason that PR stalled is because of the problem with theme changes. as mentioned in the first comment:
so, currently here: app = Application("myapp")
app.theme_mode = "dark" # or let it auto-detect
Action(
id="my.action",
title="Do Thing",
icon={"dark": "mdi:some-icon", "color_dark": "#FFFFFF", "color_light": "#000000"},
...
)The icon color is resolved once — at the moment the so, it feels like a partially implemented thing that will pretty quickly have a bug report or feature request |
|
Does something like this make sense? One thing I noticed when testing this out with |
if you try it out and it works for you, it seems fine to me.
i need a bit more context: what did you observe and how did it differ from what you expected? |
| ) | ||
| self.setChecked(_current()) | ||
|
|
||
| def changeEvent(self, event) -> None: |
There was a problem hiding this comment.
pyright is unhappy because it says changeEvent is not a method on QAction (of which this is a subclass), only on QWidget... so are we sure this method actually ever fires?
There was a problem hiding this comment.
Yep, I thought it worked but I tested it wrong. Fixed now using event filters instead.
|
Ok so I pushed some changes that should make this work as intended. I also updated temporarily the demo so you test it out, with 2 new buttons: the first changes "system theme" by changing the qpalette. The second changes the model's theme between light and dark manually. When you swap theme, you'll see that while the icon theme color overrides (blue and red) apply correctly to the two new buttons, they don't affect the scissors icon as long as it's disabled: that grey-out colopr is hardcoded somewhere else. IMO it should be a desaturated version of the provided color? |
Trying to pick up #130!
I fixed conflicts and brought it up to date. @tlambert03 was there something specific with that PR that was incomplete or you wanted to finish?