Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#334 closed bug (invalid)

missing rectangular area where mark can be set on default theme

Reported by: Roman Kargin Owned by:
Priority: normal Milestone: 5.0-2017R2
Component: foreign application Version: 5.0-2017R1
Severity: minor Keywords:
Cc: OS Platform: AmigaOS4
Blocked By: Blocking:
Release Notes:

Description

When porting ChocolateCastle and LibMaker, found that on default theme there is missing rectangular areaa where marks can be set, and instead it looks like its just whole background.

I attached 2 images to show what i mean. One are ChocolateCastle without mark set and with mark set and another one LibMaker with the same empty and set marks. I also point out on problem areas via red rectangle.

Attachments (2)

1.png (76.0 KB) - added by Roman Kargin 22 months ago.
2.png (88.3 KB) - added by Roman Kargin 22 months ago.

Download all attachments as: .zip

Change History (6)

Changed 22 months ago by Roman Kargin

Attachment: 1.png added

Changed 22 months ago by Roman Kargin

Attachment: 2.png added

comment:1 Changed 22 months ago by Thore Böckelmann

Component: undefinedforeign application
Milestone: future release5.0-2017R2
Priority: undecidednormal
Resolution: invalid
Status: newclosed

This is the function of ChocolateCaste for creating the checkmark objects:

Object *labelled_checkmark(STRPTR label, IPTR id)
{
	Object *o;

	o = MUI_NewObjectM(MUIC_Group,
		MUIA_Group_Horiz, TRUE,
		MUIA_Group_Child, MUI_NewObjectM(MUIC_Image,
			MUIA_Image_Spec, "6:15",
			MUIA_ShowSelState, FALSE,
			MUIA_InputMode, MUIV_InputMode_Toggle,
			MUIA_CycleChain, TRUE,
			MUIA_UserData, id,
		TAG_END),
		MUIA_Group_Child, MUI_NewObjectM(MUIC_Text,
			MUIA_Text_Contents, label,
			MUIA_Text_SetMax, TRUE,
		TAG_END),
	TAG_END);

	return o;
}

And this is MUI's CheckMark() macro:

#define CheckMark(selected)\
    ImageObject,\
        ImageButtonFrame,\
        MUIA_InputMode        , MUIV_InputMode_Toggle,\
        MUIA_Image_Spec       , MUII_CheckMark,\
        MUIA_Image_FreeVert   , TRUE,\
        MUIA_Selected         , selected,\
        MUIA_Background       , MUII_ButtonBack,\
        MUIA_ShowSelState     , FALSE,\
        End

Spot the obvious difference regarding frames and backgrounds and then you will know who is guilty here. Even on MorphOS there must be the same misbehaviour.

comment:2 Changed 22 months ago by Roman Kargin

As far as i can see on morphos it works with that code:
http://krashan.ppa.pl/articles/libmaker/libmaker1.png

But maybe that code bases on their default theme .. dunno.

comment:3 in reply to:  2 Changed 22 months ago by Thore Böckelmann

Replying to Roman Kargin:

As far as i can see on morphos it works with that code:
http://krashan.ppa.pl/articles/libmaker/libmaker1.png

But maybe that code bases on their default theme .. dunno.

You are right. The image is visible only because it heavily relies on that specific theme. A different theme will definitely cause exactly the same invisible unchecked Checkmark object.

You can see for yourself that the checkmark image is always visible in the lower part of your LibMaker screenshot. Just look at the checkmark objects label "Every functions in a separate file" and "Every class method in a separate file".

A Checkmark object should always get a frame by the application. If the user chooses a checkmark image which comes with its own embedded frame it should be named appropriately to let MUI remove the outer frame. This is explained in the FAQ: https://muidev.de/wiki/FAQ/General%20Questions#Howareframesettingsinfluencedbycertainimages

Both ChocolateCastle and LibMaker are wrong here. You cannot expect the user to choose a specific theme only to get a fully visible and working GUI.

comment:4 Changed 22 months ago by Roman Kargin

I just fear before it was something in mos's mui default settings (like have by default some settings for background), but i will change code anyway. Thanks for worry :)

Note: See TracTickets for help on using tickets.