It is currently Thu Jun 07, 2018 10:19 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Before posting a bug report or a feature request, search the forum for an older post on the same topic.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Wed Oct 28, 2015 11:52 am 
Offline
User avatar

Joined: Wed Oct 28, 2015 11:39 am
Posts: 4
The biggest problem is that I have multiple monitors with mixed UHD and HD resolutions - including 192DPI, 144DPI and 96DPI monitors - and the start menu is not sized correctly when using the start button on the individual monitors.

Windows 10 adds a slider (per monitor) that allows the UI to be scaled via the system - which makes it easier to test an implementation with non UHD monitors (install two 1600x1200 monitors - and set one to 200% - only in Windows 10).

Here is the link to look at about get the Start Menu implemented with Per-Monitor-DPI awareness.

https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 28, 2015 8:44 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5331
There are 3 problems here:
1) The start menu runs inside Explorer, therefore it depends if the Explorer process is multi-DPI aware or not. I have to check
2) The start menu only has one set of small and one set of large icons and their sizes are determined at startup. It is not possible to use different size icons for each monitor
3) The font sizes and the skin element sizes are determined when the skin is loaded. If you keep switching monitors the skin has to be reloaded

Out of those, only #3 is something that can be done, and even then there is some performance cost for reloading the skin. The menu may open slower if you switch monitors


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 28, 2015 11:36 pm 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5341
Explorer.exe seems to have DPI aware manifest and on Windows 10, Microsoft made changes to Explorer to scale per-monitor (dynamic scaling): https://blogs.technet.microsoft.com/ask ... indows-10/

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and did Classic Shell's testing and usability/UX feedback.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 29, 2015 8:40 am 
Offline
User avatar

Joined: Wed Oct 28, 2015 11:39 am
Posts: 4
Windows Explorer actually has many more sizes for all of its icons - the limit is with using SHGetFileInfo - where it only has small and large flag - I am using an alternate API which allows me to ask the OS for pixel sizes - so I can get the icons to use at sizes I want to use.

When there is not a larger size, I use Windows Imaging (WIX) to scale the icon bitmaps to the size required. I actually use the 256x256 size of an ICO to generate all intermediate sizes below using the FANT filter of WIX.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 29, 2015 8:49 am 
Offline
User avatar

Joined: Wed Oct 28, 2015 11:39 am
Posts: 4
For the skins problem:

Fonts - the sizes provided can be considered for 96DPI - and use nNewFontSize=MulDiv(nFontSize,nMonitorDpi,96); to get the per-monitor font size.
Images/graphics - do not worry about having exact sizes for every DPI - instead use WIX to scale (FANT for going down in size, CUBIC for going up)

Also, only activate this code path if the user has a multiple-monitor system with monitors that have different DPI - this can avoid memory over-use.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 29, 2015 9:21 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5331
I am not talking about Explorer or SHGetFileInfo. I am talking about the internal cache stored by the start menu and saved to disk. It does not support arbitrary number of sizes. Particularly because icons are mostly preloaded, they would have to be preloaded at many different sizes because I don't know what DPI will be used when you open the menu next. That adds overhead to both performance and code complexity.

I know how to scale fonts. The problem is that to create an HFONT you need to give it actual pixel size. If the next time the DPI is different, a new font needs to be created. Same for skin elements. Some skins contain bitmaps to be used for high DPI values. At the time of loading the skin the correct bitmap is chosen based on the DPI and the rest are discarded. If the next time the DPI is different, the skin must be loaded again.


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 17, 2015 4:33 am 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5341
@llcepick, try Classic Shell 4.2.5. It supports per-monitor DPI. The text and menu elements are scaled independently for each monitor. The icon size depends on the global system DPI.

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and did Classic Shell's testing and usability/UX feedback.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 08, 2016 5:10 am 
Offline
User avatar

Joined: Wed Oct 28, 2015 11:39 am
Posts: 4
I have been using it for a while now... This is working so much nicer. Thanks!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.