jurplel / qView

Practical and minimal image viewer

Home Page:https://interversehq.com/qview/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`kimg_psd.dll` should prob not be included by default

brian6932 opened this issue · comments

Environment:

  • OS: Windows 10
  • qView version: nightly 2023-12-27.1

Information:
I often go through my folders with arrow keys, and most of the time psd files don't actually open within qView and throw an error. Ofc I can just delete it within qView_dir/imageformats, but maybe including it by default's questionable. At the very least I feel like certain formats should just be excluded/excludable from folder seeking, so maybe this is also a feature request in disguise.

Similar issues: #638, #603

Ah I wasn't aware of your fork, nice

A little off topic, but any idea why your fork (and #666) doesn't theme the titlebar anymore?
I have

$env:QT_QPA_PLATFORM
windows:darkmode=1

and it works on the nightly version used here which was built on Qt 6.2.2.
It may be specifically related to the Qt version you're using, as I've built programs with Qt >= 6.6.0 and they still theme the titlebar.

I tried this artifact for a different Qt version https://github.com/jdpurcell/qView/actions/runs/8040054619 and it also exhibits it.

I don't know, I'll have to see if I can reproduce it sometime. I'm mostly using macOS these days honestly. I know Qt has been working on dark mode on Windows and maybe they're forcing use of Fusion style to get the dark titlebar. Fusion style is the "Non-native theme" option in my fork by the way.

they're forcing use of Fusion style to get the dark titlebar

Nah, Windows can have native dark titlebars, within DWM itself (DWMWA_USE_IMMERSIVE_DARK_MODE), Qt's supported this feature for a few years now.

Fusion style is the "Non-native theme" option in my fork

Yea I noticed fusion mode on your fork, and tried it, but wasn't able to get dark mode to work, it was just light mode, is there some separate toggle or something?


Side note, I'm down to build qView if it helps for debugging this issue, but need to refresh on qmake and .pro again, has been a few years since I last used that, Qt >= 6.0.0 uses cmake as default nowadays.

... any idea why your fork (and #666) doesn't theme the titlebar anymore?

I can reproduce this - I was testing by passing the command line argument -platform windows:darkmode=1 and got the dark title bar with Qt 6.2 but light title bar with Qt 6.5. But as I understand from Qt's blog entry and the commit here, that was an intentional change - Qt will now only use the dark title bar if the window background color is darker than the text color in the "default palette" (whatever that means*).

Yea I noticed fusion mode on your fork, and tried it, but wasn't able to get dark mode to work, it was just light mode, is there some separate toggle or something?

It's because of that darkmode=1 setting apparently, 1 means just for the window frame (when allowed by the previously mentioned logic), and 2 enables full dark mode support.

*EDIT: Default palette is just a QPalette created w/ its empty constructor, the values of which can be influenced by calling qApp->setPalette for example. To demonstrate Qt's newer logic for dark titlebars, one could run:

QPalette darkPalette;
darkPalette.setColor(QPalette::Window, QColorConstants::DarkGray);
darkPalette.setColor(QPalette::WindowText, QColorConstants::LightGray);
qApp->setPalette(darkPalette);

To force a dark titlebar even with the default style on Windows 10, but this of course is nothing more than a demonstration due to the obvious side effects.

2 enables full dark mode support.

Ah yes that works, nice