XXX_SoftStyle for all gadgets

AmigaOS users can make feature requests in this forum.
Post Reply
User avatar
mritter0
Posts: 214
Joined: Mon Aug 25, 2014 9:41 pm
Location: Bettendorf, IA, USA

XXX_SoftStyle for all gadgets

Post by mritter0 »

Why is there not the option to set the SoftStyle for ALL gadget types? I want to set the style for CheckBoxClass buttons:

Code: Select all

LAYOUT_AddChild,			ChildObjects[GAD_APPEARANCE_DEVICES_BOLD]=IIntuition->NewObject(CheckBoxClass,NULL,
    GA_ID,						GAD_APPEARANCE_DEVICES_BOLD,
    GA_Underscore,				~0,
    GA_RelVerify,				TRUE,
    GA_Text,					SAK_LocaleString(MSG_APPEARANCE_BOLD),
    GA_Selected,				Prefs->DevicesBold,
    CHECKBOX_SoftStyle,               FSF_BOLD,
TAG_DONE),
Workbench Explorer - A better way to browse drawers
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: XXX_SoftStyle for all gadgets

Post by chris »

Try GA_TextAttr.
You can get the screen's TextAttr from the Screen structure or (better) using GetScreenAttr. Copy and modify ta_Style to add FSF_BOLD, and pass this.
It's not quite as easy, but it should work for all gadgetclass subclasses.

Another option is to create the string using label.image and pass it as a GA_Image. Creating labels like this is more flexible than the simple text processing most gadgets are lumbered with, the downside is they can't reformat them as they can with text, so sometimes they need a bit of extra care.
Post Reply