feat: Add --dark flag to iv for Dark Mode#5019
feat: Add --dark flag to iv for Dark Mode#5019sh4shv4t wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
|
|
21381a5 to
c73846c
Compare
Signed-off-by: sh4shv4t <shashvat.kk@gmail.com> Signed-off-by: sh4shv4t <shashvat.k.singh.16@gmail.com>
ee88b2c to
72ec5b3
Compare
|
Hi @lgritz, could you please have a look at this PR once? I have added the styling via a --dark command-line argument and will add the Preferences toggle and persistence logic once the styling is approved. |
|
Sorry for the delay. I actually did test this but had mixed results. I tried both on my personal Mac, and on my work Linux machine. In both cases, I saw minimal change, but maybe that's because I run in dark mode? Is it possible that Qt behavior is that the OS display choices explicitly choosing dark mode impose a dark palette and so this makes a visible change only if your OS and user choices are light mode? Or is it possible that it only makes a difference on certain window managers, or on MS Windows (which I couldn't test)? Can you please post images showing the before and after appearance of iv that you expect with these changes? It's 100% ok with me if all this effectively does is make it look dark when in light OS mode, but on effect if you've already selected dark mode and imposed a dark palette across the board. That still would be an acceptable patch. My bigger concern, though, was that I -- totally coincidentally, I would not have consciously thought to try this -- tested it by displaying an image that happened to have an alpha channel and was transparent in some places, and this patch (versus main) definitely led to a different appearance in the "transparent" pixels. It must somehow change the background color? I would like for you to test this and track it down, we wouldn't this to inadvertently change/lighten the background pixel color for pixels with non-1.0 opacity. |
Fixes #4710
Description
This PR implements the core Dark Mode logic for the
ivviewer.Current Implementation:
--darkcommand-line argument.QPalette.Note on Preferences:
I noticed the request in the issue to add this to the Preferences Menu for persistence. I wanted to submit the CLI implementation first to verify that the
Fusionstyle and color palette meet the project's visual standards.Once this styling is approved, I am happy to add the Preferences toggle and persistence logic in a follow-up commit to this PR.
Tests
iv.exe --dark test_image.jpg: Verified the UI loaded in dark mode.iv.exe test_image.jpg: Verified the UI loaded in standard mode.Checklist:
--helpoutput is automatically updated).