[Cuis-dev] Wrong background color in window title buttons

Luciano Notarfrancesco luchiano at gmail.com
Mon May 29 12:07:51 PDT 2023


Right, in that case we shouldn’t draw anything else besides the icon, makes
sense.

On Mon, 29 May 2023 at 21:06 Juan Vuletich <juan at cuis.st> wrote:

> On 5/24/2023 6:54 PM, Luciano Notarfrancesco via Cuis-dev wrote:
>
> Ah, it shows up only without round buttons. Change Theme>>#roundButtons to
> return false and you should see it.
>
> On Wed, 24 May 2023 at 22:32 Juan Vuletich <juan at cuis.st> wrote:
>
>> On 5/24/2023 3:08 PM, Luciano Notarfrancesco via Cuis-dev wrote:
>> > The close/collapse/expand/menu buttons in SystemWindows are
>> > PluggableButtonMorphs, so they adopt the window color when the window
>> > is opened in the world (see SystemWindow>>#openInWorld and
>> > PluggableButtonMorph>>#adoptWidgetsColor:). The color is set when
>> > opening the window and never changes. Then, when a window is active,
>> > the title is draw with a lighter color, and this doesn’t match the
>> > color of the buttons and causes a dark square shadow. At first I
>> > thought this was because we were using rasterized icons, but no, it’s
>> > just a bug. Perhaps it’s more noticeable in my image because of the
>> > color scheme I’m using.
>> >
>> > Juan, what’s the right way to fix this? I would prefer not to add
>> > variables to PluggableButtonMorph, or create a subclass, or hardcode
>> > some special case in >>#adoptWidgetsColor:. Perhaps you have a better
>> > idea?
>>
>> Hi Luciano,
>>
>> I can't reproduce the problem in the stock Cuis image. Button background
>> pixels are transparent (pixel value = 0), so they should not be affected
>> at all by the window color.
>>
>> HTH,
>
>
> Oh, I see. Well, to me the obvious solution is:
>
> PluggableButtonMorph >> drawOn: aCanvas
>     aCanvas drawButtonIconFromCurrentMorph ifFalse: [
>         self isRoundButton
>             ifTrue: [ self drawRoundLookOn: aCanvas ]
>             ifFalse: [ self draw3DLookOn: aCanvas ]].
>
> The idea is that if a button is an icon, it is neither "round" nor "3d",
> just the icon. Does this make sense and work well for you?
>
> Thanks,
>
> --
> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230529/a95c6b73/attachment.htm>


More information about the Cuis-dev mailing list