[Cuis-dev] button label text color

Mark Volkmann r.mark.volkmann at gmail.com
Sat Jun 8 15:58:33 PDT 2024


I tried your suggestions, but I'm doing something wrong. Here's what I did.
Do you see where I went wrong?

- added labelColor instance variable to PluggableButtonMorph class

- added this line to the instance initializeMethod:

     labelColor := Theme current buttonLabel.

- added these instance methods:

   labelColor: aColor
       labelColor := aColor

   labelColor
       ^labelColor

- changed this line in the drawEmbossedLabelOn: method which used to refer
to Theme current buttonLabel

   colorForLabel := self enableLabelColorWith: labelColor.

On Sat, Jun 8, 2024 at 4:09 PM Mariano Montone via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

>
> El 8/6/24 a las 17:48, Mark Volkmann via Cuis-dev escribió:
> > How can I change the color of the label text in a PluggableButtonMorph?
> > I tried hard to find the answer on my own, but couldn't find it.
>
> It can't be changed directly. It takes the color from the current theme.
>
> Theme current buttonLabel.
>
> I think the button morph should have a labelColor instance variable,
> that when set uses that color, and falls back to the theme color if not
> set.
>
>
>          Mariano
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240608/6e5f1a74/attachment.htm>


More information about the Cuis-dev mailing list