How to change balloon help colors?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change balloon help colors?

Chris Muller-3
I want to have BalloonMorphs with translucent color and white text.
Setting BalloonMorph class>>#setBalloonColor: with a TranslucentColor
does not work -- it sets the color but displays only at alpha 1.0.

Adding the following to (BalloonMorph class>>#getTextMorph:for:) as
the last line before the return:

  m textColor: Color white

does not work.

Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

Bert Freudenberg
On 12.01.2016, at 06:20, Chris Muller <[hidden email]> wrote:
>
> I want to have BalloonMorphs with translucent color and white text.
> Setting BalloonMorph class>>#setBalloonColor: with a TranslucentColor
> does not work -- it sets the color but displays only at alpha 1.0.

Works fine in an Etoys image, if you want to compare.

Note that the system uses balloonMorphClass nowadays, though.

> Adding the following to (BalloonMorph class>>#getTextMorph:for:) as
> the last line before the return:
>
>  m textColor: Color white
>
> does not work.

Try
        attributes: {TextFontReference toFont: balloonOwner balloonFont. TextColor white}

- Bert -






smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

marcel.taeumel
In reply to this post by Chris Muller-3
Squeak 5.0 has new-style balloon tips enabled. So you have to deal with NewBalloonMorph class. If you disable them in preferences, you can go on working on the BalloonMorph class.

If you enable alpha in the color, you might want to remove/disable the shadow that new-style balloon tips have.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

marcel.taeumel
Otherwise, you can display regular text objects in the new-style balloon tips. Just change the text color of the #balloonText to white and it should work.

Like this:



So we have to improve the following in NewBalloonMorph:

- Disable the shadow if the balloon color has an alpha < 1.0
- Let each morph have its own balloon color (if it wants to) to better support text objects in Morph >> #balloonText:

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

Chris Muller-3
I overrode Morph>>#showBalloon:hand: to take out the drop shadow, but
trasluncent color is still not being honored.  I like the look of the
NewBalloonMorph, but I don't understand why it seems less functional /
flexible than the old BalloonMorph..

I added to the end of Morph>>#showBalloon:hand:

     .... snip...
     balloon hasDropShadow: false.  "<--- added this"
     balloon popUpFor: self hand: h.

I also want rounded corners on my NewBalloonMorph, but since it no
longer inherits from BorderedMorph I'm not able to do that.  Classic
BalloonMorph has the ability to do that or not, as desired..

I don't need each Morph to have its own balloon color, but I do want
to be able to control all the attributes of all Balloons.  There are a
lot of attributes right? -- background-color, foreground-color, font,
border-thickness, border-style, shadow presence or not, etc. -- so I
wonder whether we shouldn't just have a "preferredBalloonPrototype"
preference from which we can make a deepCopy each time?  The the
prototype would BE the "settings"...


On Tue, Jan 12, 2016 at 6:01 AM, marcel.taeumel <[hidden email]> wrote:

> Otherwise, you can display regular text objects in the new-style balloon
> tips. Just change the text color of the #balloonText to white and it should
> work.
>
> Like this:
>
> <http://forum.world.st/file/n4870852/balloon.png>
>
> So we have to improve the following in NewBalloonMorph:
>
> - Disable the shadow if the balloon color has an alpha < 1.0
> - Let each morph have its own balloon color (if it wants to) to better
> support text objects in Morph >> #balloonText:
>
> Best,
> Marcel
>
>
>
>
> --
> View this message in context: http://forum.world.st/How-to-change-balloon-help-colors-tp4870808p4870852.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

marcel.taeumel
I will have look at it.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

marcel.taeumel
Btw: Rounded corners are bound to "rounded menu corners" --- do you we need an extra preference for that, too?

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

Nicolai Hess-3-2

BTW,
@marcel, you did some work for rounded corners. Can you look at the bug about rounded scrollbars, they look really Stränge.

Am 13.01.2016 8:01 vorm. schrieb "marcel.taeumel" <[hidden email]>:
Btw: Rounded corners are bound to "rounded menu corners" --- do you we need
an extra preference for that, too?

Best,
Marcel



--
View this message in context: http://forum.world.st/How-to-change-balloon-help-colors-tp4870808p4871024.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

Nicolai Hess-3-2


Am 13.01.2016 8:16 vorm. schrieb "Nicolai Hess" <[hidden email]>:
>
> BTW,
> @marcel, you did some work for rounded corners. Can you look at the bug about rounded scrollbars, they look really Stränge.

"strange"

>
> Am 13.01.2016 8:01 vorm. schrieb "marcel.taeumel" <[hidden email]>:
>>
>> Btw: Rounded corners are bound to "rounded menu corners" --- do you we need
>> an extra preference for that, too?
>>
>> Best,
>> Marcel
>>
>>
>>
>> --
>> View this message in context: http://forum.world.st/How-to-change-balloon-help-colors-tp4870808p4871024.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>



Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

marcel.taeumel
In reply to this post by marcel.taeumel
Hi Chris,

your things should work fine now:
http://forum.world.st/The-Trunk-Morphic-mt-1064-mcz-td4871028.html

Here is an example:


Note that bold balloon fonts might look better on on a dark background with white. The property #defaultBalloonTextColor is used for strings and embellished text objects.

Also note that #menuAppearance3d still controls the drop shadows in the system and that menu properties and balloon properties are somewhat bound together in terms of border width (and maybe other stuff). Why? Hmm... because they are both popupable? :-D Don't know...

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

marcel.taeumel
In reply to this post by Nicolai Hess-3-2
Reply | Threaded
Open this post in threaded view
|

Re: How to change balloon help colors?

Chris Muller-3
In reply to this post by marcel.taeumel
Thank you Marcel!

On Wed, Jan 13, 2016 at 1:38 AM, marcel.taeumel <[hidden email]> wrote:

> Hi Chris,
>
> your things should work fine now:
> http://forum.world.st/The-Trunk-Morphic-mt-1064-mcz-td4871028.html
>
> Here is an example:
> <http://forum.world.st/file/n4871032/balloon-2.png>
>
> Note that bold balloon fonts might look better on on a dark background with
> white. The property #defaultBalloonTextColor is used for strings and
> embellished text objects.
>
> Also note that #menuAppearance3d still controls the drop shadows in the
> system and that menu properties and balloon properties are somewhat bound
> together in terms of border width (and maybe other stuff). Why? Hmm...
> because they are both popupable? :-D Don't know...
>
> Best,
> Marcel
>
>
>
> --
> View this message in context: http://forum.world.st/How-to-change-balloon-help-colors-tp4870808p4871032.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>