Hofknecht / SystemTrayMenu

SystemTrayMenu - Browse and open your files easily
http://hofknecht.eu/systemtraymenu/
GNU General Public License v3.0
642 stars 45 forks source link

[Feature] Default "Icon size" and "Row height" to match Windows File Explorer #418

Closed chip33 closed 2 years ago

chip33 commented 2 years ago

It would be neat if the default (100%) values of "Icon size" and "Row height" in Settings -> Size and location matched those of Windows File Explorer.

If the default settings for Application size, Icon size and Row height were then all set to 100% a new STM install would automatically produce an interface that perfectly matches the Windows UI settings at all display resolutions.

On my 4K display I have set "Application size" to 100% and "Icon size" to 74% and "Row height" to 124% to match Explorer and tested this with varying resolution and display scaling values.

Optimal 4K settings:

Screenshot 2022-07-19 153002

At 1080 resolution, (changing display scaling doesn't seem to alter the results), "Icon size" at 90% and "Row height" at 116% gives the most exact equivalence to Explorers spacing values.

The "Icon size" of 90% @ 1080 does not tally with 74% @ 4K so could the default value be refactored to be the same as the Windows File Explorer icon padding? This way the default would match with the icon size in Explorer across all resolutions.

Default "Row height" could also be coded to be 'resolution independent' so that it also matches Explorer at all resolutions.

Optimal 1080 settings:

1080

4K settings (74% and 124%) on 1080 display:

Screenshot 2022-07-19 125800

Hofknecht commented 2 years ago

@chip33 Thank you for the hint! I had to fight a bit here, now seems to work fine, at least much more precisely.

The cause of the wrong height was the automatic adjustment of the data grid view. It differs depending on dpi size. Own calculation of height seems be be accurate.

the size of the icon was in relation to the height, which i have now removed. I also added a calculation so it is now very similar to windows explorer. (you may have to increase the row height if you want to enlarge the icon)

I also improved the horizontal spacing to the text.

it also now works correctly with option application size in percent.

I also improved the logic of whether a small or large icon is used, so that it now looks sharper.

Default is now application size from 125% -> 100%

it is now adapted to windows explorer from windows 10. I hope that it is similar for you under Windows 11 or I think the row height is a bit larger, but that should now be a stable value for all resolutions.

We would be happy if you look at it again to see if it fits now and if you notice other things

chip33 commented 2 years ago

Hi , amazing! I absolutely will check it out. Windows 11 does have a larger default row height than windows 10 but I have set the option back to match Windows 10 by selecting "Compact view" in File Explorer. I will check this out with the larger Windows 11 height setting too.

Screenshot 2022-07-27 210143

Thanks for doing this :)

chip33 commented 2 years ago

Hi, I have been looking at this great change.

Screenshots are all at 4K but I also tested Row heights at 1080 and results are all exactly the same and resolution independent!

Plus, I am on Windows 11 Insider Beta build 22H2 so these changes appear solid on the next release of Windows 11.

  1. bug in auto refresh root folder where a blank space is left when an item is deleted. If STM is then closed and reopened the space disappears. If you like I can open a bug report for this.

bug on remove items refresh

  1. Row height ( & icon size) at 100% is absolutely perfect with windows 11 compact view.

  2. Row height ( & icon size) at 156% is absolutely perfect with windows 11 default view. 182322903-f35a8163-bb62-4f38-af10-a8b0ade430fa

So I superimposed screenshots of File Explorer to see what the actual new Windows 11 default Row heights is... the value of 156% given by STM matches very closely with the actual new default spacing used in Windows 11. Amazing.

Row height 156% test: Test row height 156

chip33 commented 2 years ago

I did notice that since this change (and not with 1.3.0.6) clicking the OK button on the Settings menu (even when no changes are made) always causes the Settings menu to lag and remain open for 2 to 3 seconds before closing.

chip33 commented 2 years ago

If you change the windows resolution while STM GUI and/or the Settings menu are open the STM GUI and the settings menu do not resize correctly until you restart STM. I don't know how easy it is to trigger a STM restart on display resolution change but that would stop this issue.

Hofknecht commented 2 years ago

@chip33 Thank you for the feedback! i understand it is working fine. point 1. fixed here: #430 topic related to slow option: fixed it here in last commit version 1.3.0.13

the topic related to change dpi required restart of app. There is an event dpichanged, but I detected that the event was triggering too often, e.g. when starting a game, so i removed it. i will check again if we can use this event without triggering too often. i made a note in project

If I've missed something, please write again : )

Hofknecht commented 2 years ago

@chip33 related to live dpi adjustment raised by you https://github.com/Hofknecht/SystemTrayMenu/issues/418#issuecomment-1200501974) find my answer here #437 => unfortunately without a solution for now but we have described the problem and maybe we will come up with something in the future