GadTools IM_MENU shortcuts

A forum for general AmigaOS 4.x support questions that are not platform-specific
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: GadTools IM_MENU shortcuts

Post by chris »

salass00 wrote:
salass00 wrote: Another problem which still also needs to be fixed is that if the image is too high then the shortcut text isn't aligned correctly with the amiga button image. I'll look into that later...
Just fixed this.

Now looking into the different highlighting of BOOPSI images. The main reason seems to be that BOOPSI image menu items use HIGHIMAGE while non-BOOPSI ones use HIGHCOMP highlighting method. If I change it so that BOOPSI image menu items also use HIGHCOMP it leads to a hard crash when the menu is opened so maybe some code there doesn't like BOOPSI images...
AIUI these highlight flags are used by Intuition. HIGHIMAGE would seem to be correct as the BOOPSI image's select state is put into the SelectFill, however what is in SelectFill isn't actually exactly correct... but then I haven't a clue what the internals are like. Sounds like you are making progress anyway, thanks!
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: GadTools IM_MENU shortcuts

Post by salass00 »

chris wrote: AIUI these highlight flags are used by Intuition. HIGHIMAGE would seem to be correct as the BOOPSI image's select state is put into the SelectFill, however what is in SelectFill isn't actually exactly correct... but then I haven't a clue what the internals are like. Sounds like you are making progress anyway, thanks!
Since gadtools.library leaves the SelectFill set to NULL the only difference between HIGHIMAGE and HIGHCOMP is that HIGHCOMP draws a selection box around the menu item while HIGHIMAGE doesn't.

BTW I just tried setting HIGHCOMP again for BOOPSI image menu items and it doesn't crash anymore so something must have been fixed in intuition.library since last I tried :-) (the main reason I tried it now again was to see if I could get some useful crash info from the serial).

This still leaves two issues that need to be looked into:
1) No padding is added for the selection box around BOOPSI image menu items.
2) There is still the weird light blue box around images which seems to be from rendering the image in its IDS_SELECTED state.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: GadTools IM_MENU shortcuts

Post by chris »

salass00 wrote:2) There is still the weird light blue box around images which seems to be from rendering the image in its IDS_SELECTED state.
I'd not noticed that one!
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: GadTools IM_MENU shortcuts

Post by salass00 »

chris wrote: I'd not noticed that one!
It might be in a different colour depending on your GUI preferences but you can see it in this screenshot:
Image

It is also rendered in HIGHIMAGE mode.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: GadTools IM_MENU shortcuts

Post by chris »

salass00 wrote:
chris wrote: I'd not noticed that one!
It might be in a different colour depending on your GUI preferences but you can see it in this screenshot:
Image
I wouldn't have noticed because I don't have your fix for the additional highlighting. ;)

Isn't that just because label.image's highlighting is a different colour from whatever Intuition is doing? Maybe ignoring the BOOPSI image's own selected image and just calculating the same as for "classic" Images might be better? Or can some tweaking be done to imageclass/label.image to add a menu mode (similar to gadgetclass' "in window border" option) to fix the highlighting so it matches? Or can label.image's selected state just be fixed - is it used for anything else? I've never seen a selected label.image and not sure it is possible to select them except in menus!
It is also rendered in HIGHIMAGE mode.
It looks much better than before.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: GadTools IM_MENU shortcuts

Post by salass00 »

I just checked and it is label.image that does the highlighting. It uses FILLPEN for this BTW.

I don't think not using IDS_SELECTED mode in intuition.library is a good idea but some way to disable the highlighting effect in label.image seems reasonable enough to me.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: GadTools IM_MENU shortcuts

Post by chris »

salass00 wrote:I don't think not using IDS_SELECTED mode in intuition.library is a good idea but some way to disable the highlighting effect in label.image seems reasonable enough to me.
It just needs a LABEL_InMenu, LABEL_NoHighlight or something - I assume any transparent areas get the main band of highlighting.

btw, is the white text something you've changed, happened due to HIGHIMAGE, or a change somebody else has made? On the public components, the label.image text stays black when highlighted (which bugs me).
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: GadTools IM_MENU shortcuts

Post by salass00 »

chris wrote: btw, is the white text something you've changed, happened due to HIGHIMAGE, or a change somebody else has made? On the public components, the label.image text stays black when highlighted (which bugs me).
The latest beta version of label.image is 53.12 which should also be the latest public one.

Looking at the source code it uses FILLTEXTPEN for rendering text in IDS_SELECTED state (TEXTPEN is used otherwise). Maybe FILLTEXTPEN is the same as TEXTPEN in your GUI prefs?
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: GadTools IM_MENU shortcuts

Post by chris »

salass00 wrote:Looking at the source code it uses FILLTEXTPEN for rendering text in IDS_SELECTED state (TEXTPEN is used otherwise). Maybe FILLTEXTPEN is the same as TEXTPEN in your GUI prefs?
Yes, it is. I changed it to white but now all my active window titles are white which looks horrid (so I've changed it back). Shouldn't label.image be using SELECTTEXTPEN for highlighted text? And SELECTPEN for the background?
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: GadTools IM_MENU shortcuts

Post by salass00 »

chris wrote: Yes, it is. I changed it to white but now all my active window titles are white which looks horrid (so I've changed it back). Shouldn't label.image be using SELECTTEXTPEN for highlighted text? And SELECTPEN for the background?
That would make sense and it would get rid of the menu highlighting problem but unfortunately it's probably not that smart a change to do since most other ReAction classes seem to prefer FILLPEN and FILLTEXTPEN for this purpose as well. Just changing label.image to use SELECTPEN and SELECTTEXTPEN instead of FILLPEN and FILLTEXTPEN is probably likely to make some GUIs look inconsistent.

Edit: After a more thorough look the only gadget class that seems to use SELECTPEN by default instead of FILLPEN for highlighting is chooser.gadget and that is probably mainly because it's meant to look and work similar to a menu.
Post Reply