Menu +Break/+BarBreak observation

Put simple Tips and Tricks that are not entire Tutorials in this forum
JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Menu +Break/+BarBreak observation

Post by JBensimon » 12 Mar 2020, 08:56

This is likely not a bug given that AHK menus are system-drawn, but I thought I'd mention it in case it's fixable: when +Break or +BarBreak is used to break up a menu into multiple columns, item names and their corresponding icons are "scrunched" together much closer than they would be otherwise. Compare the following two pop-up menus, one with and one without a column break.

JB
Attachments
Break.png
Break.png (175.45 KiB) Viewed 4662 times
NoBreak.png
NoBreak.png (139.12 KiB) Viewed 4662 times

K201902
Posts: 29
Joined: 23 Feb 2019, 11:31

Re: Menu +Break/+BarBreak observation

Post by K201902 » 02 Jul 2022, 12:30

Hi!
Probably won't give you exactly the answer you are looking for, but when I experimented and did this:

Code: Select all

Menu, Apps, Icon, &Calibre, C:\Program Files\Calibre\calibre.exe, 1, 0
instead of this

Code: Select all

Menu, Apps, Icon, &Calibre, C:\Program Files\Calibre\calibre.exe, 1
I've got a big 32x32 icon and a thick, wide menu line. Probably not what you are after since you have way too many items in the menu for this to be comfortable, but...

(more info here: https://www.autohotkey.com/docs/commands/Menu.htm#MenuIcon)

EDIT:
BTW since you can set the size of the icon you require instead of the zero that I've used, maybe you could have 24x24 icon, use it and have a decent menu line height even in mutiple-column menus.

:)
k
Attachments
sm2.png
sm2.png (11.39 KiB) Viewed 2153 times

lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Menu +Break/+BarBreak observation

Post by lexikos » 03 Jul 2022, 03:19

Win32 menus are usually rendered by uxtheme.dll, but not if they use +Break or +BarBreak.

If you use an owner-draw menu, you can control the sizing.

Post Reply

Return to “Tips and Tricks (v1)”