biolab / orange-canvas-core

Orange Canvas core workflow editor
GNU General Public License v3.0
33 stars 60 forks source link

[ENH] Color styled widget icons #271

Closed ales-erjavec closed 1 year ago

ales-erjavec commented 1 year ago

Issue

Fixes: gh-270

Changes

Color widget icons based on current palette where appropriate.

By default when running in dark mode the colors are inverted to fit the background to foreground grayscale range.

Screenshot_20230511_143619

Screenshot_20230511_143839

Note that 'Color' is quite badly drawn.

But also add support for explicitly using palette styled widget icons like in https://github.com/biolab/orange3/pull/6444

Screenshot_20230511_152623

Screenshot_20230511_152231

PrimozGodec commented 1 year ago

After checkout, these branch icons are oversized (see screenshot below). My setup is a laptop with a retina screen and an external "normal" screen plugged in. Everything is fine when I open Orange on the retina or only use an external screen. The problem happens when both screens are on, and I open orange on the external screen.

Screenshot 2023-05-26 at 08 36 27

ales-erjavec commented 1 year ago

After checkout, these branch icons are oversized (see screenshot below). My setup is a laptop with a retina screen and an external "normal" screen plugged in.

Is this happening using Qt6?

PrimozGodec commented 1 year ago

Is this happening using Qt6?

Yes, I have PyQt6. I can also try it later on PyQt5. Edit: I tested it with PyQt5, and the same error is also present.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 91.92% and project coverage change: +0.24 :tada:

Comparison is base (ee765db) 75.06% compared to head (43b52f2) 75.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #271 +/- ## ========================================== + Coverage 75.06% 75.30% +0.24% ========================================== Files 97 99 +2 Lines 20766 20953 +187 ========================================== + Hits 15588 15779 +191 + Misses 5178 5174 -4 ``` | [Impacted Files](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab) | Coverage Δ | | |---|---|---| | [orangecanvas/registry/discovery.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL3JlZ2lzdHJ5L2Rpc2NvdmVyeS5weQ==) | `38.28% <0.00%> (ø)` | | | [orangecanvas/registry/utils.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL3JlZ2lzdHJ5L3V0aWxzLnB5) | `93.65% <ø> (ø)` | | | [orangecanvas/document/quickmenu.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2RvY3VtZW50L3F1aWNrbWVudS5weQ==) | `68.76% <36.36%> (+0.02%)` | :arrow_up: | | [orangecanvas/resources.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL3Jlc291cmNlcy5weQ==) | `75.69% <77.77%> (-0.69%)` | :arrow_down: | | [orangecanvas/utils/image.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL3V0aWxzL2ltYWdlLnB5) | `92.45% <92.45%> (ø)` | | | [orangecanvas/gui/iconengine.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2d1aS9pY29uZW5naW5lLnB5) | `96.11% <96.11%> (ø)` | | | [orangecanvas/gui/svgiconengine.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2d1aS9zdmdpY29uZW5naW5lLnB5) | `90.85% <96.42%> (+6.47%)` | :arrow_up: | | [orangecanvas/application/application.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2FwcGxpY2F0aW9uL2FwcGxpY2F0aW9uLnB5) | `61.72% <100.00%> (+0.47%)` | :arrow_up: | | [orangecanvas/application/canvastooldock.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2FwcGxpY2F0aW9uL2NhbnZhc3Rvb2xkb2NrLnB5) | `70.55% <100.00%> (+0.68%)` | :arrow_up: | | [orangecanvas/application/widgettoolbox.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2FwcGxpY2F0aW9uL3dpZGdldHRvb2xib3gucHk=) | `61.29% <100.00%> (-0.16%)` | :arrow_down: | | ... and [4 more](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab) | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/271/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

ales-erjavec commented 1 year ago

Can you check again with the latest version.

PrimozGodec commented 1 year ago

Can you check again with the latest version.

It looks good now.