You are not logged in.

#1 2020-01-31 00:23:12

novice
Member
Registered: 2020-01-30
Posts: 5

[SOLVED] Where to change tooltip colours

Is there any way to make all the tooltips on the tint2 panel the same colour?  Some of the tooltips in the systray are different.  The clock and logout/shutdown ones are the same as the ones on the rest of the panel, but the ones for the NetworkManager, PNMixer and XFCE Power Manager differ in colour.  I'm using the Crocus-Remix theme.
I have been googling all week trying to find an answer but haven't found anything that has worked for me.  I have been editing the gtk-contained.css file in my home/themes/Crocus-Remix/gtk-3.0 folder, but also read somewhere that certain apps run as root and those need to be changed in usr/share/themes/ which I have tried.  Are these the correct files?
I'm new to linux so I'm just finding my way around but from what I can make out I'm on BL 9.8 and Linux 4.9.0-11-amd64(x86_64) if this helps.
Just one more thing:  Once I have made changes to the gtk files, what do I need to do for them to take effect?  Do I need to reboot every time?
Any help much appreciated as I'm a bit OCD over these things:)

Last edited by novice (2020-02-01 17:13:59)

Offline

#2 2020-01-31 01:06:53

damo
....moderator....
Registered: 2015-08-20
Posts: 5,967

Re: [SOLVED] Where to change tooltip colours

@hhh probably knows the details, but....

Systray applications set their tooltip from the gtk theme, in your case Crocus-Remix. The tasks, clock tray etc get theirs from the tint2 in use, so you can edit that to match.

I suggest copying the tint2 config and calling it something like "Crocus.tint2rc", then edit it, using the same colours, padding and font as your theme. Here is an example section:

# Tooltips
tooltip = 1
tooltip_padding = 2 2
tooltip_show_timeout = 0.0
tooltip_hide_timeout = 0.0
tooltip_background_id = 7
tooltip_font_color = #ADD8E6 100
tooltip_font = Sans normal 9.0

PS: Save your current settings with Preferences -> BLOB themes manager first, then add a new BLOB with your new setup. That way you can easily match a tint2 panel with whichever gtk/OB theme and background you settle on. Use the menu to edit, select or restart tint2.

Once I have made changes to the gtk files, what do I need to do for them to take effect?  Do I need to reboot every time?

The simplest way is using lxappearance (Preferences -> Appearance) - just apply a different theme, then switch back to the one you want. Or logout/in again.

Last edited by damo (2020-01-31 01:33:11)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2020-01-31 14:13:18

novice
Member
Registered: 2020-01-30
Posts: 5

Re: [SOLVED] Where to change tooltip colours

Thanks damo.
Yes, I did a backup with BLOB before starting to change things (learned that lesson the hard way years ago).  I missed out in my post that I have sussed out how to change the colours in tint2 and will change them to match if I can't get a solution.  It was just that I prefer the colours that tint2 uses for the tooltips and would have liked to get the others to match those.
I did quite a bit of programming years ago, including a little html/css stuff, but this has me stumped.  Like I say, I'm new to linux and really appreciate how much user configuration it allows.  I just wish there was more documentation on how to do it.  I'm having fun learning though.

Offline

#4 2020-01-31 15:31:47

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,022
Website

Re: [SOLVED] Where to change tooltip colours

An info tool

killall nm-applet
GTK_DEBUG=interactive nm-applet
# should give you an inspector type of gui

Here I figured out the thing is actually called 'tooltip'. (surprise)

Then google-a-lot,
https://bbs.archlinux.org/viewtopic.php?id=227579 ,
then

cd ~/.config/gtk-3.0
geany gtk.css

and I added

tooltip {

    background-color: #000000;

}

and restart nm-applet and now I have all gtk3 tooltips with black background. I'am guessing a more atomic nm-applet selector is possible.

p.s. probably worth reading
https://wiki.archlinux.org/index.php/GTK

Last edited by brontosaurusrex (2020-01-31 18:25:27)

Offline

#5 2020-01-31 18:16:37

novice
Member
Registered: 2020-01-30
Posts: 5

Re: [SOLVED] Where to change tooltip colours

Thanks brontosaurusrex but I have already visited the two links you mention, along with numerous others.  I know it's the tooltip values I need to edit but the problem is, after I change them the tooltip colours still don't change.  I'm missing something somewhere.

Offline

#6 2020-01-31 18:24:32

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,022
Website

Re: [SOLVED] Where to change tooltip colours

I my example I just restarted nm-applet and the new stuff applied.
https://youtu.be/wxTdoZzecok < This of any help?

Last edited by brontosaurusrex (2020-01-31 18:39:08)

Offline

#7 2020-01-31 18:59:12

ohnonot
...again
Registered: 2015-09-29
Posts: 4,511
Website

Re: [SOLVED] Where to change tooltip colours

brontosaurusrex wrote:
tooltip {

    background-color: #000000;

}

The epitome of bad UI/web design!
This sort of stuff was exactly why all those FF dark fixes never used to work.
What if you choose a theme that uses #000000 for text colour?
wink

novice wrote:

I know it's the tooltip values I need to edit but the problem is, after I change them the tooltip colours still don't change.  I'm missing something somewhere.

The new gtk settings won't be applied until you restart the app in question.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#8 2020-02-01 14:56:21

novice
Member
Registered: 2020-01-30
Posts: 5

Re: [SOLVED] Where to change tooltip colours

Thanks ohnonot
Well it looks like I've just wasted a week of my life on this.  I've just tried this again and it does work. This time I edited both gtk-2.0 and gtk-3.0 files in the system folders AND my home folders all at once and the tooltips changed.  So then I started changing the values back to default one at a time and checking each time, and found just editing my home folder was enough.  I didn't do anything I haven't been doing all week but I think I know where I was going wrong.  It seems that two of the apps are getting their settings from gtk-3.0 and one from gtk-2.0.  When I was changing just one file and checking the result, by pure fluke I must have been checking an app that hadn't changed. I know that seems implausible but it's the only explanation I can think of.

BTW ohnonot, I'm 100% with you.  Hard coding values in programming never ends up well.

Should I mark this as solved now - How?

Offline

#9 2020-02-01 15:51:48

damo
....moderator....
Registered: 2015-08-20
Posts: 5,967

Re: [SOLVED] Where to change tooltip colours

novice wrote:

...
Should I mark this as solved now - How?

Edit your first post and add "[SOLVED]" to the title


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#10 2020-02-02 03:42:47

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,778
Website

Re: [SOLVED] Where to change tooltip colours

Hi @novice - it's great to hear you've fixed this!

To be honest, the BL devs have long been unhappy with the discrepancy between the native tint2 tooltips and GTK tooltips in the system tray, but other tasks have interfered with tackling the issue. (There aren't so many of us.) Now you've nailed it, I wonder if you could help us by posting some details of what you edited?

When you have a moment... smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#11 2020-02-04 06:19:09

ohnonot
...again
Registered: 2015-09-29
Posts: 4,511
Website

Re: [SOLVED] Where to change tooltip colours

^ yes that would be nice.

novice wrote:

I edited both gtk-2.0 and gtk-3.0 files in the system folders AND my home folders all at once and the tooltips changed.

It shouldn't be necessary and never is recommended to change this sort of configuration system-wide. TBH, I wouldn't even know where those are stored.

It seems that two of the apps are getting their settings from gtk-3.0 and one from gtk-2.0.  When I was changing just one file and checking the result, by pure fluke I must have been checking an app that hadn't changed.

If you just used the (preinstalled) lxappearance (it's called "Change Look and Feel" or some such), this wouldn't happen.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#12 2020-02-04 16:53:39

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,022
Website

Re: [SOLVED] Where to change tooltip colours

The other way would be to change tint2 config to approximately match gtk3 theme, to get info from yeti for example:

cd ~/.themes/yeti/gtk-3.0
gresource list gtk.gresource | grep css # gives /org/gnome/arc-theme/gtk-main.css
gresource extract gtk.gresource /org/gnome/arc-theme/gtk-main.css > tmp.css

Then find the tooltip section, which looks like this in my example

tooltip {
  border-radius: 2px;
  box-shadow: none; }
  tooltip.background {
    background-color: #40474d;
    background-clip: padding-box; }
    tooltip.background label {
      padding: 4px; }
  tooltip decoration {
    background-color: transparent; }
  tooltip * {
    background-color: transparent;
    color: #9ba8bb; }

and try to change tint2rc to match this stuff.
https://youtu.be/8kn6NbEup6M
https://i.redd.it/q6els6rt4rd41.jpg

Last edited by brontosaurusrex (2020-02-04 16:59:51)

Offline

#13 2020-02-05 00:21:21

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,778
Website

Re: [SOLVED] Where to change tooltip colours

^Yes tweaking tint2 tooltips to match GTK is definitely easier, but:

novice wrote:

... I have sussed out how to change the colours in tint2 and will change them to match if I can't get a solution.  It was just that I prefer the colours that tint2 uses for the tooltips and would have liked to get the others to match those.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#14 2020-02-05 06:50:36

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,022
Website

Re: [SOLVED] Where to change tooltip colours

@johnraff: My future self will google this and have at least a beginning of a bidirectional answer (and the op did not explain either way). How is that for completeness and stability of space-time?

Offline

#15 2020-02-05 07:26:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,778
Website

Re: [SOLVED] Where to change tooltip colours

Still eagerly waiting for a reply from @novice on GTK tooltip theming. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#16 2020-02-09 00:18:42

novice
Member
Registered: 2020-01-30
Posts: 5

Re: [SOLVED] Where to change tooltip colours

Guys I'm really sorry for not replying sooner bit I naively thought the thread would be closed once it was marked 'solved' so haven't checked back.

johnraff - I wouldn't say I have completely nailed it.  I just got the colours to match by editing the tooltip section in:

~/.themes/Crocus-Remix/gtk-3.0/gtk-contained.css

and the gtk-color-scheme for tooltips in:

~/.themes/Crocus-Remix/gtk-2.0/gtkrc

This gives me the colours I want but the tooltips still differ in size/position - I don't know how to change this but haven't given up yet.  If I find a way I will post it.

ohnonot - It wasn't necessary to change them system-wide, that was lack of knowledge on my part.  Using lxappearance was one of the first things I tried, and I saw the options for setting tooltip colours, but unfortunately on my system those options are all grayed out.  It says 'setting color scheme is not available without lxsession as session manager'.  I have no idea what that means so I just left it at that.  It would have been much easier:)

brontosaurusrex - Yes I had been changing the tooltip section but had thought it wasn't taking effect.  I think now it was, but I wasn't checking it properly.

Thanks all.

Offline

#17 2020-02-09 05:39:41

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,778
Website

Re: [SOLVED] Where to change tooltip colours

^Thanks for the update, @novice.

About lxsession - it's part of the LXDE desktop environment and isn't used in BunsenLabs. Integrating it would likely involve making changes all round, though if we have some time later on it might be worth looking at...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#18 2020-02-09 06:42:34

ohnonot
...again
Registered: 2015-09-29
Posts: 4,511
Website

Re: [SOLVED] Where to change tooltip colours

novice wrote:

ohnonot - It wasn't necessary to change them system-wide, that was lack of knowledge on my part.  Using lxappearance was one of the first things I tried, and I saw the options for setting tooltip colours, but unfortunately on my system those options are all grayed out.  It says 'setting color scheme is not available without lxsession as session manager'.  I have no idea what that means so I just left it at that.  It would have been much easier:)

That's not what I meant, and I see now that I might've misunderstood you.
lxappearance writes these settings to both ~/.gtkrc-2.0 and ~/.config/gtk-3.0/settings.ini:

gtk-theme-name
gtk-icon-theme-name
gtk-font-name
gtk-cursor-theme-name
gtk-cursor-theme-size
gtk-toolbar-style
gtk-toolbar-icon-size
gtk-button-images
gtk-menu-images
gtk-enable-event-sounds
gtk-enable-input-feedback-sounds
gtk-xft-antialias
gtk-xft-hinting
gtk-xft-hintstyle
gtk-xft-rgba

No more, no less.

I agree that lxsession is not something we want on bunsenlabs. It wouldn't help with GTK/tint2 color compatibility anyhow.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

Board footer

Powered by FluxBB