Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
134 user(s) are online (115 user(s) are browsing Forums)

Members: 2
Guests: 132

Mr_byte, Amigafreak02, more...

Support us!

Headlines

 
  Register To Post  

Bad highlighting of depressed image+label buttons
Just popping in
Just popping in


See User information
Hello,

I have some buttons in my program which have as their label an image and two texts. These work fine under OS3.9; however on OS4.1.1 the blue highlight you expect when pressing it is restricted to just the label area rather than the whole button (this can be seen in eg. palette editor of AmiArcadia V14.51 for OS4). Buttons which are text-only highlight normally. Is this a known bug in OS4?

Each button is defined similarly to this:

LAYOUT_AddChild, gadgets[GID_BU62] =
ButtonObject,
GA_ID, GID_BU62,
GA_RelVerify, TRUE,
GA_Image,
LabelObject,
LABEL_Image, miscglyphimage[0],
LABEL_DrawInfo, DrawInfoPtr,
LABEL_Text, " ",
LABEL_Text, LLL, MSG_OK, "OK"),
LabelEnd,
ButtonEnd,

and loadmiscglyphs() is like this:

EXPORT void loadmiscglyphs(void)
{ TRANSIENT int i;
TRANSIENT ULONG buttonheight,
miscglyphheight; // used to be hardcoded to 9
PERSIST FLAG first = TRUE;
PERSIST const STRPTR miscglyphimagename[MISCGLYPHIMAGES] =
{ "PROGDIR:images/ok",
"PROGDIR:images/cancel"
};

if (first)
{ first = FALSE;

DISCARD lockscreen(TRUE);

if (!(miscglyphimage[0] =
BitMapObject,
BITMAP_SourceFile, miscglyphimagename[0],
BITMAP_Screen, ScreenPtr,
End))
{ unlockscreen();
strcpy(errstring, GetCatalogStr(CatalogPtr, MSG_ERROR_CANTLOAD, "Can't load"));
strcat(errstring, " ");
strcat(errstring, miscglyphimagename[0]);
strcat(errstring, "!");
rq(errstring);
}
DISCARD GetAttr(BITMAP_Height, miscglyphimage[0], (ULONG *) &miscglyphheight);
if (DrawInfoPtr->dri_Font->tf_YSize > miscglyphheight)
{ buttonheight = DrawInfoPtr->dri_Font->tf_YSize;
} else
{ buttonheight = miscglyphheight;
}
// buttonheight is whichever is taller: font or bitmap
DisposeObject(miscglyphimage[0]);
miscglyphimage[0] = NULL;

for (i = 0; i < MISCGLYPHIMAGES; i++)
{ if (!(miscglyphimage[i] =
BitMapObject,
BITMAP_SourceFile, miscglyphimagename[i],
BITMAP_Screen, ScreenPtr,
BITMAP_Masking, TRUE,
BITMAP_Transparent, TRUE,
IA_Height, buttonheight,
End))
{ unlockscreen();
strcpy(errstring, GetCatalogStr(CatalogPtr, MSG_ERROR_CANTLOAD, "Can't load"));
strcat(errstring, " ");
strcat(errstring, miscglyphimagename[i]);
strcat(errstring, "!");
rq(errstring);
} }
unlockscreen();
} }

Go to top
Re: Bad highlighting of depressed image+label buttons
Home away from home
Home away from home


See User information
@Minuous

Thanks to report here, i see that you packed all OS4 related issue in: http://amigan.1emu.net/releases/ami-code.txt

We may send all this problems via email to the OS4 maintainers, maybe to Massimo Tantignone

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project