Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-06-05 17:10:56

Friedrich
Member
Registered: 2016-09-18
Posts: 158
LinuxFirefox 139.0

Background Color of a selected File in Thunar

Hi,

when i select a file in thunar i have the normal blue background. When thunar isn't the active window the background color should be grey. In xfce 4.18 iused this

.thunar .standard-view:backdrop .view:selected { color: #7d7d7d; background-color: #d1d1d1 }

in ~/.config/gtk-3.0/gtk.css.

I installed Xubuntu 24.04 with Xfce 4.20 on 2 devices. On my desktop i have the desired background without the like in gtk.css. On the other device the background is blue. The line in gtk.css makes nothing. I don't understand why the background is different on 2 computers with the same xfce version and the same ubuntu. I use the normal greybird on both.

Offline

#2 2025-06-05 18:58:00

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,993
LinuxFirefox 139.0

Re: Background Color of a selected File in Thunar

Perhaps a typo in gtk.css? Perhaps you can post its full content.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-06-05 20:10:24

Friedrich
Member
Registered: 2016-09-18
Posts: 158
LinuxFirefox 139.0

Re: Background Color of a selected File in Thunar

This is my gtk.css on both systems:

scrollbar { background-image: linear-gradient(to right, #e8e8e8, white); border: 0; transition: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94); }
*, headerbar.selection-mode .subtitle:link, .selection-mode.titlebar:not(headerbar) .subtitle:link { -GtkScrollbar-has-backward-stepper: 1; -GtkScrollbar-has-forward-stepper: 1; -GtkScrollbar-has-secondary-forward-stepper: 1; }

scrollbar slider { min-width: 15px; min-height: 15px; margin: 0 ; border: 1px solid #828282; border-radius: 3px; background-clip: padding-box; background-image: linear-gradient(to right, #dbdbdb, #d1d1d1); }
scrollbar.fine-tune slider { min-width: 11px; min-height: 11px; border: 3px solid #828282; }

scrollbar button { padding: 0; min-width: 15px; min-height: 15px; border-style: none; border-radius: 0; transition-property: min-height, min-width, color; border-color: transparent; background-image: linear-gradient(to right, #dbdbdb, #d1d1d1); box-shadow: inset 0 1px rgba(255, 255, 255, 0); text-shadow: none; -gtk-icon-shadow: none; color: #595959; }
scrollbar button:hover { border-color: transparent; background-image: linear-gradient(to right, blue, blue); box-shadow: inset 0 1px rgba(255, 255, 255, 0); text-shadow: none; -gtk-icon-shadow: none; color: #e8e8e8; }

.thunar .standard-view:backdrop .view:selected { color: #7d7d7d; background-color: #d1d1d1 }

XfdesktopIconView.view  {
 background-color: transparent; 
}

XfdesktopIconView.view .label:selected {
    background-color: rgba(53,132,228,0.5);
    color: red;
    border-radius: 3px;
}

XfdesktopIconView.view .rubberband {
   border-color: #1a74d3;
   background-color: rgba(209, 227, 246, 0.25);
  border-radius: 0; }

I can't remember what line 1 and 2 are doing :-)

Added later 10 min 14 s:
It looks like something strange happens here. I added

XfdesktopIconView.view .label:selected {
    background-color: rgba(53,132,228,0.5);
    color: red;
    border-radius: 3px;
}

a few minutes before i posted my answer. On my desktop this results in the normal behaviour when i select icon on the desktop. the label is light blue and the text color keeps white. When i delete the code the label is transparent and only the icons is changed a little bit. But on the other device with the same code the text color is red and the label is light blue.

Offline

#4 2025-06-05 21:02:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,993
LinuxFirefox 139.0

Re: Background Color of a selected File in Thunar

I'm confused. In your original post, you mentioned thunar. Here you are talking about xfdesktop. Can you confirm where the issue is occurring?

Also:

thunar -V
xfdesktop -V

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-06-06 05:09:17

Friedrich
Member
Registered: 2016-09-18
Posts: 158
LinuxFirefox 139.0

Re: Background Color of a selected File in Thunar

Sorry. This happens when you try to make two things at the same time. My problem is thunar.

thunar -V
thunar 4.20.2 (Xfce 4.20)

Copyright (c) 2004-2024
	The Thunar development team. All rights reserved.

Written by Benedikt Meurer <benny@xfce.org>.

Please report bugs to <https://gitlab.xfce.org/xfce/thunar>.

xfdesktop -V
This is xfdesktop version 4.20.1, running on Xfce 4.20.
Built with GTK+ 3.24.41, linked with GTK+ 3.24.41.
Build options:
    Desktop Menu:        enabled
    Desktop Icons:       enabled
    Desktop File Icons:  enabled

Offline

#6 2025-06-06 09:53:04

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,993
LinuxFirefox 139.0

Re: Background Color of a selected File in Thunar

Backup your existing gtk.css file and then create a new one with only the following content:

.thunar .standard-view:backdrop .view:selected { color: #7d7d7d; background-color: #d1d1d1 }

Then quit and restart thunar:

thunar -q; thunar

Is the problem still there or resolved?


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2025-06-06 12:00:55

Friedrich
Member
Registered: 2016-09-18
Posts: 158
LinuxFirefox 139.0

Re: Background Color of a selected File in Thunar

Thunar looks on both systems exactly the same with an empty gtk.css and with that line in. On my desktop with a grey label on the notebook with a light blue label.

Offline

#8 2025-06-06 17:09:58

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,993
LinuxFirefox 139.0

Re: Background Color of a selected File in Thunar

Slowly add the other lines one by one until something changes - then you will know which line is the problem.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.014 seconds, 7 queries executed - Memory usage: 563.14 KiB (Peak: 579.98 KiB) ]