Toolbar Icons and DPI Aware 3.1.x Topic is solved
Toolbar Icons and DPI Aware 3.1.x
Hi,
the toolbar icons are not OK after switching from 3.0.x to 3.1.x.
The same icons appear to be OK in the menu as you can see on the screen shot.
How to solve this?#
the toolbar icons are not OK after switching from 3.0.x to 3.1.x.
The same icons appear to be OK in the menu as you can see on the screen shot.
How to solve this?#
Re: Toolbar Icons and DPI Aware 3.1.x
Is this really related to HighDPI, i.e. does it not happen on displays with 100% scaling?
Which formats do the bitmaps have and how do you load them?
It also seems that two of the bitmaps look ok.Is there anything different about them?
Which formats do the bitmaps have and how do you load them?
It also seems that two of the bitmaps look ok.Is there anything different about them?
Use the source, Luke!
Re: Toolbar Icons and DPI Aware 3.1.x
The scaling is 100% of the screenshot. And the monitor is not high DPI: 1280x800. Win10-64.
The icons are PNG: 24x24.
The Icon, routes, attached looks OK in the menu but not in the toolbar.
The icons are PNG: 24x24.
The Icon, routes, attached looks OK in the menu but not in the toolbar.
- Attachments
-
- routes.png (774 Bytes) Viewed 3085 times
Re: Toolbar Icons and DPI Aware 3.1.x
I will give this note a try:
https://docs.wxwidgets.org/3.0/classwx_tool_bar.html wrote:wxMSW note: Note that under wxMSW toolbar paints tools to reflect system-wide colours. If you use more than 16 colours in your tool bitmaps, you may wish to suppress this behaviour, otherwise system colours in your bitmaps will inadvertently be mapped to system colours. To do this, set the msw.remap system option before creating the toolbar:
wxSystemOptions::SetOption("msw.remap", 0);
Re: Toolbar Icons and DPI Aware 3.1.x
That did not help; No improvement...
It seems that 3.1.x cannot handle transparency in the toolbar icons.
Any tips?
I also will try
wxSystemOptions::SetOption("msw.remap", 2);
It seems that 3.1.x cannot handle transparency in the toolbar icons.
Any tips?
I also will try
wxSystemOptions::SetOption("msw.remap", 2);
Re: Toolbar Icons and DPI Aware 3.1.x
The
did not help either.
Code: Select all
wxSystemOptions::SetOption("msw.remap", 2);
Re: Toolbar Icons and DPI Aware 3.1.x
The problem seems to be manifest related, too.
https://groups.google.com/d/msg/wx-user ... tHhs48AAAJ
What's the complete content of your manifest now?
https://groups.google.com/d/msg/wx-user ... tHhs48AAAJ
What's the complete content of your manifest now?
Use the source, Luke!
Re: Toolbar Icons and DPI Aware 3.1.x
The complete manifest:
The rc file:
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0' xmlns:asmv3='urn:schemas-microsoft-com:asm.v3'>
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
Code: Select all
#define wxUSE_NO_MANIFEST 1
#include "wx/msw/wx.rc"
wxDEFAULT_FRAME ICON "xpm/rocrail.ico"
#ifdef ISOLATION_AWARE_ENABLED
#define wxMANIFEST_ID 2
#else
#define wxMANIFEST_ID 1
#endif
wxMANIFEST_ID 24 "rocview.manifest"
Re: Toolbar Icons and DPI Aware 3.1.x
I changed the manifest into 3 CPU dependent files and includes them accordantly wx.rc.
The amd64 looks like this:
Now the toolbar is OK again...
The amd64 looks like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0' xmlns:asmv3='urn:schemas-microsoft-com:asm.v3'>
<assemblyIdentity version="0.64.1.0" processorArchitecture="amd64" name="Controls" type="win32"/>
<description>wxWindows application</description>
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
</assembly>
Re: Toolbar Icons and DPI Aware 3.1.x
The missing ""Microsoft.Windows.Common-Controls"" part was probably responsible for the icon problem.
And as mentioned before, i would remove the "permonitor" part, because wxWidgets doesn't support that yet.
And as mentioned before, i would remove the "permonitor" part, because wxWidgets doesn't support that yet.
Use the source, Luke!
Re: Toolbar Icons and DPI Aware 3.1.x
if I leave that out the App is no longer DPI Aware and is scaled. Even if wxWidgets does not support this option, it is still needed to get the app DPI Aware under Windows 10.
Re: Toolbar Icons and DPI Aware 3.1.x
Hi,
I checked it, and the DPIAwareness is at the moment not needed.
So I removed it from the manifest files.
I checked it, and the DPIAwareness is at the moment not needed.
So I removed it from the manifest files.
Re: Toolbar Icons and DPI Aware 3.1.x
What does it mean? Do you actually have a high-DPI setup? I do and as a user I find applications not supporting high DPI basically unusable: you can choose between them being rather unpleasantly blurry or their text/bitmaps being too small to be usable. In a well-behaved wxWidgets application, adding a high DPI support may not be time consuming.
</rant>
Re: Toolbar Icons and DPI Aware 3.1.x
Hi,
no, my application is not 100% HDI ready.
Just check:
https://wiki.rocrail.net/rocrail-snapshot/
no, my application is not 100% HDI ready.
Just check:
https://wiki.rocrail.net/rocrail-snapshot/