XXX_SoftStyle for all gadgets

AmigaOS users can make feature requests in this forum.

XXX_SoftStyle for all gadgets

Postby mritter0 » Sun Jan 15, 2017 10:53 pm

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),
mritter0
 
Posts: 170
Joined: Mon Aug 25, 2014 10:41 pm
Location: Bettendorf, IA, USA

Re: XXX_SoftStyle for all gadgets

Postby chris » Tue Jan 17, 2017 2:00 am

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.
chris
 
Posts: 542
Joined: Sat Jun 18, 2011 12:05 pm


Return to AmigaOS Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests