[Cuis-dev] Wrong background color in window title buttons
Juan Vuletich
juan at cuis.st
Mon May 29 12:19:36 PDT 2023
Cool. Just pushed it (together with an unrelated tweak to #minimumExtent.
Thanks,
On 5/29/2023 4:07 PM, Luciano Notarfrancesco via Cuis-dev wrote:
> 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
> <mailto: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
>> <mailto: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 Vuletich
> cuis.st <http://cuis.st>
> github.com/jvuletich <http://github.com/jvuletich>
> researchgate.net/profile/Juan-Vuletich <http://researchgate.net/profile/Juan-Vuletich>
> independent.academia.edu/JuanVuletich <http://independent.academia.edu/JuanVuletich>
> patents.justia.com/inventor/juan-manuel-vuletich <http://patents.justia.com/inventor/juan-manuel-vuletich>
> linkedin.com/in/juan-vuletich-75611b3 <http://linkedin.com/in/juan-vuletich-75611b3>
> twitter.com/JuanVuletich <http://twitter.com/JuanVuletich>
>
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230529/ea38a65b/attachment-0001.htm>
More information about the Cuis-dev
mailing list