Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-06-01 18:54:50

jens
Member
Registered: 2012-03-20
Posts: 26

[Solved] how to set tooltips colors ?

how and/or where can i set the foreground and background colors of XFCE's tooltips ?

Offline

#2 2012-06-01 19:20:21

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,176

Re: [Solved] how to set tooltips colors ?

Use the following code snippet:

style "my-tooltips"
{
        bg[NORMAL] = "#FF0000"
	fg[NORMAL] = "#0000FF"
}

widget "*tooltip*" style "my-tooltips"

Change the bg (background) and fg (forground) colour values as required.

For single user use, add the code to ~/.gtkrc-2.0.
For system-wide use, add the code to /etc/gtk-2.0/gtkrc.

You'll need to change the theme (appearance) away and back for it to take effect.

Offline

#3 2012-06-01 21:22:31

jens
Member
Registered: 2012-03-20
Posts: 26

Re: [Solved] how to set tooltips colors ?

very cool ! thanks a lot ! smile

Offline

#4 2012-06-02 11:14:26

vasa1
Member
Registered: 2012-05-12
Posts: 22

Re: [Solved] how to set tooltips colors ?

ToZ wrote:

Use the following code snippet:

style "my-tooltips"
{
        bg[NORMAL] = "#FF0000"
	fg[NORMAL] = "#0000FF"
}

widget "*tooltip*" style "my-tooltips"

Change the bg (background) and fg (forground) colour values as required.

For single user use, add the code to ~/.gtkrc-2.0.
For system-wide use, add the code to /etc/gtk-2.0/gtkrc.

You'll need to change the theme (appearance) away and back for it to take effect.

@Toz, is it possible to get somewhat rounded corners and adjust to the transparency of the background of gtk-2.0 tooltips?

Offline

#5 2012-06-02 13:26:13

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,176

Re: [Solved] how to set tooltips colors ?

@vasa1, try this code:

style "murrine-default"
{
	GtkWidget		::new-tooltip-style			= 1
	engine "murrine"
	{
		roundness	= 3
		trough_shades	= { 0.15, 0.3 }		
	}
}

style "murrine-tooltips"
{
	bg[NORMAL] = "#FF0000"
	fg[NORMAL] = "#0000FF"
}

class "GtkWidget"    style "murrine-default"
widget "*tooltip*" style "murrine-tooltips"

Note that it requires the murrine engine (gtk2-engines-murrine) to be installed.

As for transparency, I use the built-in window compositor. With it enabled, the tooltips are transparent.

Offline

#6 2012-06-02 14:36:20

vasa1
Member
Registered: 2012-05-12
Posts: 22

Re: [Solved] how to set tooltips colors ?

Thanks, ToZ!

I won't try the transparency part since that involves additional steps and may just end up making things "heavier", but I did copy/paste your code into my ~/.gtkrc-2.0. The results are mixed.

I do get slightly rounded corners on certain tool tips like when I hover over icons that are part of the "chrome" of the browser (Chrome, Firefox and Midori) and on icons and tabs in Xfce panels and on icons on the desktop. I also get them when using gcolor2. So that part is just perfect.

The corners are still sharp on the tooltips that appear on some forum pages with the browsers mentioned above and when hovering on icons in LibreOffice.

I also notice that my scrollbars are affected in the browser and in LibreOffice. The trough in which the thumb is located is now darker. I'll try deleting "trough_shades    = { 0.15, 0.3 }" to see if I can get back the original background.

Edit: Actually, of the browsers I have, both Chrome and Midori do show the rounded corners on forum pages whereas Firefox and Seamonkey don't. Webkit versus gecko? ???

Last edited by vasa1 (2012-06-02 16:59:44)

Offline

#7 2012-06-02 14:42:19

vasa1
Member
Registered: 2012-05-12
Posts: 22

Re: [Solved] how to set tooltips colors ?

Yes, there is no problem in deleting the line relating to trough_shades. My scrollbars are back to how I want them. If you can figure out how to get the corners curved for the other tooltips, do post your solution and I'll try it out. Meanwhile, thank you for what you provided already smile

Offline

#8 2012-06-05 20:10:32

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: [Solved] how to set tooltips colors ?

Use stylish (or maybe greasemonkey) for Firefox and add a custom style.
At http://forum.userstyles.org/discussion/ … nswered/p1 they're discussing how to make them completely square but you can make out how to make'em rounded (or ask there too).

Last edited by secipolla (2012-06-05 20:22:46)

Offline

#9 2012-06-06 02:14:18

vasa1
Member
Registered: 2012-05-12
Posts: 22

Re: [Solved] how to set tooltips colors ?

secipolla wrote:

Use stylish (or maybe greasemonkey) for Firefox and add a custom style.
At http://forum.userstyles.org/discussion/ … nswered/p1 they're discussing how to make them completely square but you can make out how to make'em rounded (or ask there too).

I use Stylish (for Firefox and Chrome) quite a lot for things that I feel cannot be achieved by tweaking the system theme or for selectively changing somethings. Using Stylish isn't possible for LibreOffice.
In any case, I may just go back to the sharp corners.

Offline

Board footer

Powered by FluxBB