Add No DPI Scaling as an option
Moderator: xnview
-
kiwichick
- Posts: 43
- Joined: Mon May 21, 2007 10:29 pm
Add No DPI Scaling as an option
Please add No DPI Scaling as an option rather than having to create a shortcut using the -noDpiScaling flag. Using the flag means the exe file can't be used and this can be problematic. For example, my file manager allows scripting so I can create a script where I select an image then click a button and the image folder will open in an image viewer (eg: XnView). But it will only work using the exe file so I can't do it for XnView if I wish to have no scaling.
-
XnTriq
- Forum Librarian
- Posts: 6575
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Add No DPI Scaling as an option
I support kiwichick's (and user0's) request.
I'm attaching a test file:
Workaround (Windows 10):user0 wrote: Tue Oct 18, 2022 8:30 amFor example, in Settings -> Interface:
- add "Enable High DPI Scaling" checkbox (enabled by default)
- add some dropbox with windows scale factors (get currect win value by default)
- etc
- Quit XnView MP.
- Copy qt.conf from your XnView MP installation folder to the desktop.
- Rename the original qt.conf to qt.conf.old.
- Open the new copy of qt.conf in Notepad.
Code: Select all
[Paths] Plugins = plugins - Add the following lines:
Code: Select all
[Platforms] WindowsArguments = dpiawareness=0 - Save qt.conf and move it to your XnView MP installation folder.
Code: Select all
[Platforms] WindowsArguments = dpiawareness=0 [Paths] Plugins = plugins - Restart XnView MP.
I'm attaching a test file:
You do not have the required permissions to view the files attached to this post.
-
kiwichick
- Posts: 43
- Joined: Mon May 21, 2007 10:29 pm
Re: Add No DPI Scaling as an option
Thanks XnTriq, I was hoping the workaround would make the toolbar button icons small (like the -noDpiScaling flag does) but unfortunately it doesn't. It is meant to? That's the only reason I use the flag.XnTriq wrote: Sat Jan 14, 2023 12:15 am I support kiwichick's (and user0's) request.
Workaround (Windows 10):user0 wrote: Tue Oct 18, 2022 8:30 amFor example, in Settings -> Interface:
- add "Enable High DPI Scaling" checkbox (enabled by default)
- add some dropbox with windows scale factors (get currect win value by default)
- etc
In addition to that, you might want to enable Zoom on HiDPI screen: 1 image pixel equals 1 screen pixel in Tools → Settings… → View → View.
- Quit XnView MP.
- Copy qt.conf from your XnView MP installation folder to the desktop.
- Rename the original qt.conf to qt.conf.old.
- Open the new copy of qt.conf in Notepad.
Code: Select all
[Paths] Plugins = plugins- Add the following lines:
Code: Select all
[Platforms] WindowsArguments = dpiawareness=0- Save qt.conf and move it to your XnView MP installation folder.
Code: Select all
[Platforms] WindowsArguments = dpiawareness=0 [Paths] Plugins = plugins- Restart XnView MP.
I'm attaching a test file:
p183782.png
-
XnTriq
- Forum Librarian
- Posts: 6575
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Add No DPI Scaling as an option
Yes, it definitely should. Is Large icons activated in Tools → Settings… → Interface → ToolBar?kiwichick wrote: Sun Jan 29, 2023 4:23 amThanks XnTriq, I was hoping the workaround would make the toolbar button icons small (like the -noDpiScaling flag does) but unfortunately it doesn't. It is meant to? That's the only reason I use the flag.
-
XnTriq
- Forum Librarian
- Posts: 6575
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Add No DPI Scaling as an option
I'm sorry, kiwichick! You are right. Changing dpiawareness=0 does not have the same effect as -noDpiScalingXnTriq wrote: Sun Jan 29, 2023 9:45 pmYes, it definitely should. Is Large icons activated in Tools → Settings… → Interface → ToolBar?kiwichick wrote: Sun Jan 29, 2023 4:23 amThanks XnTriq, I was hoping the workaround would make the toolbar button icons small (like the -noDpiScaling flag does) but unfortunately it doesn't. It is meant to? That's the only reason I use the flag.
-
kiwichick
- Posts: 43
- Joined: Mon May 21, 2007 10:29 pm
Re: Add No DPI Scaling as an option
Thanks for confirming that for me. What a shame. Well, fingers crossed it will be added as a feature at some pointXnTriq wrote: Mon Jan 30, 2023 4:45 pm I'm sorry, kiwichick! You are right. Changing dpiawareness=0 does not have the same effect as -noDpiScaling![]()
-
Ravanelli
- Posts: 11
- Joined: Thu Nov 21, 2024 9:19 pm
Re: Add No DPI Scaling as an option
Hi,
I use this "-noDpiScaling" flag as well, but after updating to the latest version, it no longer works.
I hope that you can revert the change, or even better; give us an option in the GUI.
Thanks.
I use this "-noDpiScaling" flag as well, but after updating to the latest version, it no longer works.
I hope that you can revert the change, or even better; give us an option in the GUI.
Thanks.
-
user0
- XnThusiast
- Posts: 3135
- Joined: Sat May 09, 2015 9:37 am
Re: Add No DPI Scaling as an option
in Qt6 you can alter scaling via Qt environment variablesRavanelli wrote: Mon Oct 05, 2026 12:38 pm I use this "-noDpiScaling" flag as well, but after updating to the latest version, it no longer works.
- disable scaling
QT_ENABLE_HIGHDPI_SCALING=0
- use custom scaling
QT_SCALE_FACTOR=xxx
- calculation
xxx = desired scale / current windows scale
eg for 150% windows scale it looks like:
100% - 0.667 (100/150 = 0.667)
125% - 0.833
150% - 1.000
175% - 1.167
200% - 1.333
- calculation
- permanent
add User variable
in Windows Settings > System > About > Advanced system settings > Advanced > Environment VariablesCode: Select all
name: QT_ENABLE_HIGHDPI_SCALING value: 0Code: Select all
name: QT_SCALE_FACTOR value: 0.667
- temporary
make .bat file
Code: Select all
set QT_ENABLE_HIGHDPI_SCALING=0 start "" "C:\Program Files\XnViewMP\XnViewMP.exe"Code: Select all
set QT_SCALE_FACTOR=0.667 start "" "C:\Program Files\XnViewMP\XnViewMP.exe"
related
Settings - general - add theme management
-
Ravanelli
- Posts: 11
- Joined: Thu Nov 21, 2024 9:19 pm
Re: Add No DPI Scaling as an option
Thanks, I tried it (with different values) but it doesn't have the same effect/look as the flag.user0 wrote: Mon Oct 05, 2026 1:53 pmin Qt6 you can alter scaling via Qt environment variablesRavanelli wrote: Mon Oct 05, 2026 12:38 pm I use this "-noDpiScaling" flag as well, but after updating to the latest version, it no longer works.
- disable scaling
QT_ENABLE_HIGHDPI_SCALING=0it can be:
- use custom scaling
QT_SCALE_FACTOR=xxx
- calculation
xxx = desired scale / current windows scale
eg for 150% windows scale it looks like:
100% - 0.667 (100/150 = 0.667)
125% - 0.833
150% - 1.000
175% - 1.167
200% - 1.333
- permanent
add User variable
in Windows Settings > System > About > Advanced system settings > Advanced > Environment VariablesCode: Select all
name: QT_ENABLE_HIGHDPI_SCALING value: 0Code: Select all
name: QT_SCALE_FACTOR value: 0.667
- temporary
make .bat file
Code: Select all
set QT_ENABLE_HIGHDPI_SCALING=0 start "" "C:\Program Files\XnViewMP\XnViewMP.exe"Code: Select all
set QT_SCALE_FACTOR=0.667 start "" "C:\Program Files\XnViewMP\XnViewMP.exe"
related
Settings - general - add theme management