Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-07-29 13:25:00

jt1122
Member
Registered: 2021-03-26
Posts: 240

Thunar selected items colour

Hi,

I'm using thunar 4.16.3 (Xfce 4.16), Sparky linux 6.

I've set  ~./.config/gtk-3.0/gtk.css:
.thunar .view { background-color: #CCCCCC; }

How do I set the colour of selected items?.

Thanks

Offline

#2 2021-07-29 14:30:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Thunar selected items colour

This should work:

.thunar .view { background-color: #CCCCCC;}
.thunar .view:selected { background-color: yellow; color: blue; }

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-07-29 14:46:03

jt1122
Member
Registered: 2021-03-26
Posts: 240

Re: Thunar selected items colour

Great, thanks.

Offline

#4 2022-05-04 21:47:34

dreimal
Member
Registered: 2022-05-04
Posts: 7

Re: Thunar selected items colour

ToZ wrote:

This should work:

.thunar .view { background-color: #CCCCCC;}
.thunar .view:selected { background-color: yellow; color: blue; }

This works beautifully, thank you!

Is it possible to do the same for selections on the sidebar/shortcuts pane? I've tried to decipher gtkinspector but I'm just not clever enough.

Offline

#5 2022-05-04 22:37:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Thunar selected items colour

dreimal wrote:

Is it possible to do the same for selections on the sidebar/shortcuts pane? I've tried to decipher gtkinspector but I'm just not clever enough.

Welcome to the forums!

Perhaps this post can help.


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

#6 2022-05-04 23:57:28

dreimal
Member
Registered: 2022-05-04
Posts: 7

Re: Thunar selected items colour

ToZ wrote:

Perhaps this post can help.

Thanks so much, ToZ - the first two lines of your cheatsheet are just what I was looking for:

.thunar .shortcuts-pane .view {background-color: red} /* sidebar - shortcuts view */
.thunar .shortcuts-pane .view {color: blue} /* sidebar - shortcuts view - font color - can use pseudo states :selected, :hover */

I almost caught a clue from scrabbling around GTK Inspector, but I think my trying to include

:selected {background-color: red}

was causing it to fail.

I now have my Thunar looking better than ever, easy to read and without the uncomfortable glare from a bright white background, all thanks to lots of helpful tips and clear advice on this forum. Thank you again!

Offline

#7 2022-05-05 06:52:17

jt1122
Member
Registered: 2021-03-26
Posts: 240

Re: Thunar selected items colour

dreimal wrote:

.

I now have my Thunar looking better than ever, easy to read and without the uncomfortable glare from a bright white background, all thanks to lots of helpful tips and clear advice on this forum. Thank you again!

I also dislike the glaring white backgrounds most apps show.
Have a look at redshift for a system-wide solution. Works well for me.

Offline

#8 2022-05-05 07:06:21

dreimal
Member
Registered: 2022-05-04
Posts: 7

Re: Thunar selected items colour

jt1122 wrote:

Have a look at redshift for a system-wide solution. Works well for me.

Thanks for the tip - I've used redshift for a while now, love the fine control it offers.

Offline

#9 2023-03-18 06:55:17

fant
Member
Registered: 2020-10-07
Posts: 14

Re: Thunar selected items colour

using thunar 4.18.4

I just stumbled about this thread on my search to theme thunar to my likes. Thanks a lot.

.thunar .view { background-color: #CCCCCC;}
.thunar .view:selected { background-color: yellow; color: blue; }

Works pretty good, but with one issue:

If I want to select several files by drawing a frame around the considered ones with the mouse, this frame is no more transparent. It's  opaque, plain white with a blue border.
Is there a way to set the background of the rectangle to transparent?
Also, can the color of the frame be changed?

Offline

#10 2023-03-18 14:12:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Thunar selected items colour

Add the following to tweak the "rubberband":

.thunar .view .rubberband {background: rgba(0,0,0,0.1)}

You can adjust the rgba values to suit your colour theme. Note: the "a" in the rgba value is a transparency value between 0.0 and 1.0.

Edit: missed the border colour. Just add the border-color to the tweak. For example:

.thunar .view .rubberband {background: rgba(255,255,0,0.2); border-color: red}

Last edited by ToZ (2023-03-18 14:15:33)


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

#11 2023-03-18 17:35:35

fant
Member
Registered: 2020-10-07
Posts: 14

Re: Thunar selected items colour

ToZ, thanks a lot.
Works well!!!

Offline

Board footer

Powered by FluxBB