Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-11-02 15:11:45

DebbingXf
Member
Registered: 2021-11-01
Posts: 11

How do I change text colour for file names when mouse hovers over them

Hello
I would like to be able to change the colour of file name text when I mouse over it; currently the text goes from black to white which effectively makes it invisible against the off-white background. Thought I might set that text to blue. I'm using XFCE 4.16 and have (now) a gtk-3.css in my home dir.

Just to go off topic a moment:  I am very please with how well Debian Bullseye with XFCE desktop is working on my old Dell D400 laptop. Really great on such an old computer.

Thank you in advance for any guidance on this.

Cheers
Andy

Offline

#2 2021-11-02 21:30:36

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How do I change text colour for file names when mouse hovers over them

DebbingXf wrote:

I would like to be able to change the colour of file name text when I mouse over it; currently the text goes from black to white which effectively makes it invisible against the off-white background. Thought I might set that text to blue.

Assuming that you are talking about thunar, try:

.thunar .view:hover { color: blue; }

I'm using XFCE 4.16 and have (now) a gtk-3.css in my home dir.

Just to clarify, the above contents needs to go into the ~/.config/gtk-3.0/gtk.css file.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-11-02 23:07:38

DebbingXf
Member
Registered: 2021-11-01
Posts: 11

Re: How do I change text colour for file names when mouse hovers over them

Thank you very much! It worked perfectly. Yes I'm using Thunar and the css file I had put where you indicated.

It would be good to know much more about configuring gtk-3 themes, and css, so that I could modify xfce's looks as desired. If you, or anyone else, has any suggestions on how I could move forward with this I'd appreciate it. I don't know any programming or scripting languages. I have used Vim to tinker with gtk-2 files in the past, and have made a couple of bash scripts: one to turn down screen brightness using xrandr and another to pull up my webmail site when I click on the 'Mail' icon in xfce. It would be very good to be able to look at the interface elements and modify them at will. What do I need to master and in what order to be able to do this?

Thanks in advance for any guidance or suggestions.

Cheers
Andy

Offline

#4 2021-11-02 23:28:46

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How do I change text colour for file names when mouse hovers over them

DebbingXf wrote:

If you, or anyone else, has any suggestions on how I could move forward with this I'd appreciate it.

Here are a couple of links to get you started down the rabbit hole:
- https://forum.xfce.org/viewtopic.php?id=14491
- https://forum.xfce.org/viewtopic.php?id=13329


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2021-11-02 23:52:15

DebbingXf
Member
Registered: 2021-11-01
Posts: 11

Re: How do I change text colour for file names when mouse hovers over them

Thank you for those thread links. I'll read them over the next few days, but I've got to get some sleep! I'm in uk and it's just gone midnight..

Offline

#6 2021-12-20 02:08:23

DebbingXf
Member
Registered: 2021-11-01
Posts: 11

Re: How do I change text colour for file names when mouse hovers over them

Hello
I have one more question in connection with what happens to file/directory name text when mouse is used to select: when I have selected a file/directory with the mouse pointer and the colour consequently changes when I then move the pointer off the file name text the text's colour changes to white (before being approached by the mouse pointer it is black). How do I control this colour and change it from white to something else?

I don't know what to put in my ~/.config/gtk-3.0/gtk.css file.

Any guidance would be appreciated.

Cheers!
Andy

Offline

#7 2021-12-20 02:41:02

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How do I change text colour for file names when mouse hovers over them

I'm sorry I've read this a number of times and I don't understand.

Am I right that?
- You select a file and the text colour changes
- You move the pointer off the selected filename the selected text changes colour again (you don't want it to)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2021-12-21 00:18:08

DebbingXf
Member
Registered: 2021-11-01
Posts: 11

Re: How do I change text colour for file names when mouse hovers over them

Thanks for responding to my post. Yes I select the file by hovering over it and it changes colour from the usual black text to another colour I specified (green). So far so good! But when I move the pointer off the file-name it changes to another colour (in this case white) until I select another file at which point the one I de-selected goes back to having a black-text file name like all the rest in the directory.

Cheers,
Andy

Offline

#9 2021-12-21 12:22:51

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How do I change text colour for file names when mouse hovers over them

Thanks for the explanation. Add the following to the previous command to retain the colour when an item is focused in thunar:

.thunar .view:focus { color: blue; }

You basically target a different state of the widget - focused in this case.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2021-12-24 00:16:27

DebbingXf
Member
Registered: 2021-11-01
Posts: 11

Re: How do I change text colour for file names when mouse hovers over them

Cheers! Thanks for that bit of code.
Have a good Christmas..
Andy

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 561.71 KiB (Peak: 578.55 KiB) ]