Balloons
Posted
#1
(In Topic #451)
Guru

Posted
Regular

Can anybody tell me how to change the background and foreground on Balloon?
As far as I can find out they are suppose to be linked to the color of the system notification colors. I tested out that theory and found it not to be true. Also I have not found any setting in Gambas preferences that change the color that works either. You might want to ask the author of Gambas to see if there is a work around. Sorry I wasn't any help.
Posted
Regular

cogier said
Running the following code produces dark grey text on a black background.
…you are using GTK, aren't you ?
Change graphic resource: use QT.
Obviously, then, you know that you can use the HTML protocol with the text of the "Ballon" …
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Enthusiast

but you can use this to make it more visible
Balloon.Font = Font["Arial,18,Bold,italic"]
Posted
Guru

As far as I can find out they are suppose to be linked to the color of the system notification colors.
Thanks cage, I also looked for these settings but all I was able to do was read what they are and not set them.
My balloon text is white on black
but you can use this to make it more visible
Balloon.Font = Font["Arial,18,Bold,italic"]
Thanks grayghost4 but that doesn't change the colour.
..you are using GTK, aren't you ?
Change graphic resource: use QT.
Thank vott, you are correct the colours are fine with QT but why not with GTK?
Posted
Enthusiast

That is probably because I don't write the program correctly
Posted
Regular

cogier said
Thank vott, you are correct the colours are fine with QT but why not with GTK?
It is the normal coloring of Ubuntu tooltips by using GTK.
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Guru

My first test ,, try to add Background and Foreground to Balloon object
Successfully accomplished
i can now use something like
and it works fine , by default it uses the Color.TooltipBackground and Color.TooltipForeground values as normal
Now i need to figure out how to add the changes for all……
Posted
Guru

I've created my own gitlab account , forked my own version of gambas.
added the Balloon colour changes, committed it to my fork.
and sent a merge request.
With any luck Charlie you'll have Balloon colour settings at some time or other
https://gitlab.com/bsteers4/gambas
Posted
Guru

Balloon.class: Add Background and Foreground color properties. (4a1a63d4) · Commits · Bruce Steers / gambas · GitLab
If not you could put the modified balloon class files in a project (like we did with Message) and voilla , custom colours not just the generic tooltip ones
Posted
Guru

Posted
Regular

Posted
Guru

Tooltip and link properties of the Color class are now writable. Fix 'Key.Backspace' property name. (2c2b7d56) · Commits · Gambas / gambas · GitLab
Color.TooltipBackground and Color.TooltipForeground are now writeable
Ironically it does not affect tooltips but if you set the colours Balloon does use them
1 guest and 0 members have just viewed this.


