Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-10-18 08:31:32

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

[SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Hi!

Since xfdesktop-4.19.1 i have had problems with  blurry font and lost transparency which only applies to xfdesktop, see this:
https://gitlab.xfce.org/xfce/xfdesktop/-/issues/268

It has come to my understanding that the developer has removed some "custom" code and now show what the gtk-theme tells it to show. Why this theme look only applies to xfdesktop and no other component is beyond me but whatever, no meaning to argue.
Apparently you can restore the old look with ~/.config/gtk-3.0/gtk.css.

I have found out somewhat what to type in gtk.css, like:
XfdesktopIconView.view
XfdesktopIconView.view:active
XfdesktopIconView.rubberband
XfdesktopIconView.label:active

But i would like to have the old look back, and it´s not that easy to find the previous, transparency and colors and pixel border thickness and so on...

Do anyone now how the get the 4.18.1 look back?

Last edited by Von_Kossa (2023-10-21 10:55:49)

Offline

#2 2023-10-18 09:26:12

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

i have come up with something like:

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

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

XfdesktopIconView.rubberband {
    background-color: rgba(53,132,228,0.2);
}

XfdesktopIconView.label:active {
    background-color: rgba(53,132,228,0.5);
    color: #ffffff;
    border-radius: 3px;
}

Last edited by Von_Kossa (2023-10-18 17:49:13)

Offline

#3 2023-10-18 12:31:41

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

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Von_Kossa wrote:

i have come up with something like:

Does this fix the issue for you? Theme developers will also need to adapt.


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

#4 2023-10-18 12:36:22

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

I´m not sure, still working on it. smile

Offline

#5 2023-10-18 17:50:08

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Updated above mentioned theme, i think i am pretty close now. At least comparing 4.18.1 with or without entries in gtk.css.

After upgrading to 4.19.1 again and testing it in gtk.css, everything is not working as intended.
For some unknown reason for me it ignores som lines in 4.19.1
For example:

XfdesktopIconView.label:active {
    background-color: rgba(53,132,228,0.5);
    color: #ffffff;
    border-radius: 3px;
}

background-color is ignored, instead it shows completely transparent background. color and border-radius is picked up as it should.

Last edited by Von_Kossa (2023-10-18 19:08:45)

Offline

#6 2023-10-18 21:46:23

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

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

What GTK (Appearance) theme are you using?

Based on the images you posted to the bug report, it looks like you are trying to make the default (unselected) icon background transparent. To do so:

XfdesktopIconView.view .label {
    background: transparent;
    color: #ffffff;
    border-radius: 3px;
}

But in the above code, it looks like you are trying to affect the selected (active) icon. Try using the selected pseudo class:

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

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

#7 2023-10-19 07:34:44

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

I use Adwaita theme.
Actually unselected and rubberband works as it should. It is the XfdesktopIconView.view:active and XfdesktopIconView.label:active parts that doesn´t work.
I think this is because some parts are already defined in Adwaita and overrides my settings in some way. For example in XfdesktopIconView.label:active i think adwaita has already set full transparency for label making background-color useless. so how do you unset it?

Offline

#8 2023-10-19 10:27:03

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

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Try using the "selected" pseudo class instead of the "active" one:

XfdesktopIconView.view .label:selected

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

#9 2023-10-19 10:53:13

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Yeah i´ll test that, but i don´t think it will make any difference:
selected = when you hoover over an object but don´t click on it.

When i have the object active it ignores the background-color.

Offline

#10 2023-10-19 11:24:44

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

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Von_Kossa wrote:

selected = when you hoover over an object but don´t click on it.

Thats the ":hover" pseudo-class.

When i have the object active it ignores the background-color.

Try with ":selected".


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-10-19 11:32:59

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Yes sir, yes. smile

Offline

#12 2023-10-19 16:40:26

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Close but no cigarr.
After changing to selected it responds to changes. The label section now works as it should but this section doesn´t:

XfdesktopIconView.view:selected {
        background-color: rgba(0,0,0,0.3);
        color: #3584e4;
        border-radius: 1px;

It was supposed to set the color of the icon to #3584e4, but no luck.

Offline

#13 2023-10-19 21:38:11

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

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Von_Kossa wrote:

It was supposed to set the color of the icon to #3584e4, but no luck.

What do you mean by "the color of the icon"? The icon is an image. Can you provide screenshots?


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

#14 2023-10-20 05:43:06

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

4.18.1 with:
XfdesktopIconView.view:active {
    background-color: rgba(0,0,0,0.3);
    color: #3584e4;
    border-radius: 1px;

Unselected icon:
unselected

Selected icon:
selected

Changed color to black:
XfdesktopIconView.view:active {
    background-color: rgba(0,0,0,0.3);
    color: #000000;
    border-radius: 1px;
changed_color

Offline

#15 2023-10-20 17:57:21

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

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

But the color of the icon does look like #3584e4 - its the hue that covers it. Compare that to the black hue of the last image.


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

#16 2023-10-20 19:16:14

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Yes indeed it is #3584e4, but the image shows xfdesktop 4.18, if i do the same in 4.19 it does not change color.
Even if i change to selected from active, it remains like the above "unselected" image.

XfdesktopIconView.view:selected {
    background-color: rgba(0,0,0,0.3);
    color: #3584e4;
    border-radius: 1px;

Last edited by Von_Kossa (2023-10-20 19:17:26)

Offline

#17 2023-10-20 22:54:52

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

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

Okay, now I understand what you are saying. Apologies for not understanding earlier. I can replicate the issue when comparing 4.18.1 and 4.19 on my system. The secret is that in 4.18.1, you need to use the ":active" pseudo-class, but in 4.19, this pseudo class no longer works.

This appears to be the commit that refactors the code in the icon view. I've tried to revert the style changes in the xfdesktop-application.c file, but it doesn't make a difference. There must be something else in that refactor code that impacts the :active psuedoclass.

From the commit comment:

This turns the icon view into more of just a view, and removes a lot of
the icon-related logic.  Cell renderers are used to draw the icon image
and label now.  The view uses GtkTreeModel to populate itself, rather
than having the view managers add/remove things directly to/from the
view.  The icon view now doesn't know anything about the view managers,
and the manager is responsible for creating and packing an icon view
into the desktop window.

My bolded emphasis in the quote. Perhaps this change removed the ability to saturate/recolor the icon like in 4.18.1.


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

#18 2023-10-21 10:54:59

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: [SOLVED] xfdesktop-4.19.1 - restore previous theme look like in 4.18.1

I managed to get it somewhat to work, for some strange reason XfdesktopIconView.view:active worked in this case but only on "color".

So this is my solution for now:

/* xfdesktop icon theme */
XfdesktopIconView.view {
    background-color: rgba(0,0,0,0.0);
    color: #ffffff;
}

XfdesktopIconView.view:active {
    color: #3584e4;
    border-radius: 3px;
}

XfdesktopIconView.rubberband {
    background-color: rgba(53,132,228,0.2);
}

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

I will marked this as [SOLVED] even if it is not entirely correct.
Also, thanks for all your help ToZ.

Last edited by Von_Kossa (2023-10-21 11:05:22)

Offline

Board footer

Powered by FluxBB