Xfce Forum

Sub domains

You are not logged in.

#1 2017-05-17 14:18:16

Registered: 2017-05-17
Posts: 2

Porting of my xfce desktop style settings to gtk3


with the new xfdesktop ported to gtk3, I need to port my gtk2 desktop settings to gtk3 too.
Can anyone tell me, how to setup the correct css style expressions for my gtk2 settings?
I had transparent labels for my desktop icons and tried to port all of my settings to css.
Because the lack of my css knowledge, I got it worked only partly.

The former gtk2rc file there was:

style "xfdesktop-icon-view" 
	font_name = "DejaVu Sans Book"
	XfdesktopIconView::label-alpha = 0 
    	XfdesktopIconView::selected-label-alpha = 140 
    	XfdesktopIconView::ellipsize-icon-labels = 0

    	XfdesktopIconView::shadow-x-offset = 1 
    	XfdesktopIconView::shadow-y-offset = 1  
    	XfdesktopIconView::selected-shadow-x-offset = 1 
    	XfdesktopIconView::selected-shadow-y-offset = 1
	XfdesktopIconView::shadow-color = "#000000" 
    	XfdesktopIconView::selected-shadow-color = "#999999" 

    	XfdesktopIconView::cell-spacing = 5
	XfdesktopIconView::cell-padding = 0
   	XfdesktopIconView::cell-text-width-proportion = 2.8 

   	base[NORMAL] = "#cccccc" 
    	base[SELECTED] = "#cccccc" 
    	base[ACTIVE] = "#cccccc" 

    	fg[NORMAL] = "#cccccc" 
    	fg[SELECTED] = "#000000" 
    	fg[ACTIVE] = "#000000" 
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"
widget "*XfdesktopIconView*" style "xfdesktop-icon-view"
class "*XfdesktopIconView*" style "xfdesktop-icon-view"

My new gtk.css contains the following, I figured out already:

* {
   -gtk-icon-style: regular;

XfdesktopIconView {
	font: "DejaVu Sans Book";
	background-color: rgba(240, 240, 240, 0.0);
        text-shadow: 2px 2px #000000;

        margin: 0;
	padding: 0;

Transparency is working, but I don't know howto do the "active / selected - thing" and so on with this style class or whats the working css selector for this related behaviour.

Last edited by Machredsch (2017-05-17 14:19:59)


#2 2017-05-17 17:34:13

From: behind you
Registered: 2012-04-08
Posts: 578

Re: Porting of my xfce desktop style settings to gtk3

just use the gtk3 inspector on xfdesktop

pkill xfdesktop
GTK_DEBUG=interactive xfdesktop


#3 2017-05-17 17:46:34

From: Canada
Registered: 2011-06-02
Posts: 4,265

Re: Porting of my xfce desktop style settings to gtk3

Hello and welcome.

Here are my current xfdesktop GTK3 configs:

/* xfdesktop icon theming */
XfdesktopIconView.view {
	background-color: rgba(0,0,0,0.0);

XfdesktopIconView.view:active {
	background-color: rgba(0,0,0,0.3);
	color: #3D7BC7;
	border-radius: 1px;

XfdesktopIconView.rubberband {
	background-color: rgba(0,0,0,0.3);

XfdesktopIconView.label:active {
	background-color: rgba(0,0,0,0.3);
	color: white;

You can tweak as necessary.

And as @sixsixfive says, you can use the inspector, but some items, like the rubberband entity, I can't get to show up in the inspector.

How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks


#4 2017-05-18 09:15:28

Registered: 2017-05-17
Posts: 2

Re: Porting of my xfce desktop style settings to gtk3

Thank you, you 2 have helped me a lot.
I didn't know about that GTKInspector.


Board footer

Powered by FluxBB