Hamburger menu to always use default icon unless otherwise stated

Features wanted...
Post Reply
kiwichick
Posts: 673
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Hamburger menu to always use default icon unless otherwise stated

Post by kiwichick »

Currently, if we add a path on its own (ie: no caption or state), the path's default icon is used. However, if we add a caption or state for that path, the default icon is no longer used and a custom one must be entered. Can an option be added to always use the default icon unless otherwise stated? Maybe something like the state field eg: 0 (default) = use default icon, 1 = use no icon, [path_to_icon] = uses custom icon.
Windows 10 Pro 22H2

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hamburger menu to always use default icon unless otherwise stated

Post by admin »

Show an example, please.

kiwichick
Posts: 673
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Hamburger menu to always use default icon unless otherwise stated

Post by kiwichick »

admin wrote: 16 Jan 2023 17:11 Show an example, please.
Sorry, Don, I don't understand what you mean. Show an example of what?
Windows 10 Pro 22H2

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hamburger menu to always use default icon unless otherwise stated

Post by admin »

The syntax you use to state a caption for a path.

kiwichick
Posts: 673
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Hamburger menu to always use default icon unless otherwise stated

Post by kiwichick »

admin wrote: 16 Jan 2023 22:07 The syntax you use to state a caption for a path.
As stated in the Help file path;caption;
Here is what happens.
1) If I use just the path the menu will display the icon the PortableApps folder uses:
C:\PortableApps;

2) If I add a caption the icon, no icon is displayed:
C:\PortableApps;My Portable Apps;

3) The same if I add a state, no icon is displayed:
C:\PortableApps;My Portable Apps;;1;

4) Now a custom icon path is required even if it's still the icon the PortableApps folder uses. So, I'd have to add this:
C:\PortableApps;My Portable Apps;C:\PortableApps;
Or this:
C:\PortableApps;My Portable Apps;C:\PortableApps;1;

It's not really a big deal to do this but, to me, it seems unnecessary to have to add an icon path just because a caption is added. Using bits like 'state' does would be must easier. As I suggested:
0 (default) = use default icon (the icon switch could also be left blank to use the default icon, as in number 3 above)
1 = use no icon
[path_to_icon] = use custom icon
Windows 10 Pro 22H2

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hamburger menu to always use default icon unless otherwise stated

Post by admin »

It was mostly due to the fact that you are adding a trailing ";" to your lines which is not necessary (and not in the docs AFAIK). The next beta will tolerate this. :)

kiwichick
Posts: 673
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Hamburger menu to always use default icon unless otherwise stated

Post by kiwichick »

admin wrote: 17 Jan 2023 08:10 It was mostly due to the fact that you are adding a trailing ";" to your lines which is not necessary (and not in the docs AFAIK). The next beta will tolerate this. :)
Sorry, Don, I thought I'd tried with and without trailing ; and got the same result. But you are correct - well mostly. It works when adding only the caption, but not when adding the state. Then the icon must be specified. Probably because state comes after icon and icon can't be 'skipped'.
Windows 10 Pro 22H2

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hamburger menu to always use default icon unless otherwise stated

Post by admin »

It should all work in the current beta, doesn't it?

kiwichick
Posts: 673
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Hamburger menu to always use default icon unless otherwise stated

Post by kiwichick »

admin wrote: 17 Jan 2023 22:07 It should all work in the current beta, doesn't it?
Oh geez, my apologies!!!! I thought you meant only the trailing ; had been changed. Nothing about allowing empty parts was mentioned in the beta history info. I've updated and yes, all works great now. Thank you so much :appl:
Windows 10 Pro 22H2

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Hamburger menu to always use default icon unless otherwise stated

Post by jupe »

I assume because of this change, there seems to have been a side effect, if containing a trailing sep after [data] field, the icon is the (?) now when no icon source is provided, and the caption isn't a path.

eg. popupmenu("caption 1;;<crlf>caption 2;");

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Hamburger menu to always use default icon unless otherwise stated

Post by admin »

Right. Fix comes. :tup:

Post Reply