Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-05-02 09:49:27

igor87
Member
Registered: 2025-05-02
Posts: 6
LinuxFirefox 136.0

[SOLVED] Global override to remove round corners- gtk.css not working?

Hello,

i have included in my ~/.config/gtk-3.0/gtk.css the following:

/* Remove round corners from theme */
* { border-radius: 0 !important; box-shadow: none !important; }

However I am not seeing any change after restarting. Is there another method?

Last edited by igor87 (2025-05-04 10:09:16)

Offline

#2 2025-05-02 10:30:39

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,016
LinuxFirefox 138.0

Re: [SOLVED] Global override to remove round corners- gtk.css not working?

Which GTK theme are you using? Can you post the full contents of your gtk.css file?


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-05-02 10:45:59

igor87
Member
Registered: 2025-05-02
Posts: 6
LinuxFirefox 136.0

Re: [SOLVED] Global override to remove round corners- gtk.css not working?

ToZ wrote:

Which GTK theme are you using? Can you post the full contents of your gtk.css file?


Currently using Bluecurve-Lime from xfce-look.org but tested with many others including Adwaita. None seem to be affected by the radius changes in gtk.css. Was hoping i didn't have to edit theme files individually but could just apply a global rule.


Contents of ~/.config/gtk-3.0/gtk.css:

/* Remove round corners from theme */
* { border-radius: 0 !important; box-shadow: none !important; }

/* Prevent fading out of non-active window panels */
.tasklist { -XfceTasklist-minimized-icon-lucency: 100; }
.tasklist .label-hidden { opacity: 1.0 }

perhaps the global * class does not work ?

Offline

#4 2025-05-02 12:10:56

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,016
LinuxFirefox 138.0

Re: [SOLVED] Global override to remove round corners- gtk.css not working?

I see. "!important" is not valid in gtk. Try instead:

* { border-radius: 0; box-shadow: none; }

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-05-03 09:05:08

igor87
Member
Registered: 2025-05-02
Posts: 6
LinuxFirefox 136.0

Re: [SOLVED] Global override to remove round corners- gtk.css not working?

ToZ wrote:

I see. "!important" is not valid in gtk. Try instead:

* { border-radius: 0; box-shadow: none; }

Ok removing !important does make it work for most things now, unfortunately, the one thing I was trying to change seems not to be affected, the icon selection radius in thunar:

cspGY9B.jpeg

Would you happen to know the css class for the icon selection box (purple) in the screenshot?

I tried these for testing purposes:

.thunar,
.thunar .view:selected,
.iconview.view:selected,
.view:selected,
.iconview:selected,
.cell:selected,
*:selected,
*:focus,
*:active {
    border-radius: 0;
    background-color: #00ff00;
}

But none of those affected it.

Offline

#6 2025-05-03 10:43:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,016
LinuxFirefox 138.0

Re: [SOLVED] Global override to remove round corners- gtk.css not working?

What you are seeing there is the file highlight feature of thunar (see: https://gitlab.xfce.org/xfce/thunar/-/m … quests/226). It overrides gtk.css and it currently looks like its hard-coded to do rounded corners. I can't seem to find an option to override it.

You might wish to create an enhancement request to make it configurable.


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-05-04 10:07:46

igor87
Member
Registered: 2025-05-02
Posts: 6
LinuxFirefox 138.0

Re: [SOLVED] Global override to remove round corners- gtk.css not working?

Took a bit of digging but finally managed to do it. Had to modify the source file thunar/thunar-util.c and change the line #define BORDER_RADIUS 8 to #define BORDER_RADIUS 0 then rebuild it. Finally no more round corners. Thanks for pointing me in the right direction.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 551.88 KiB (Peak: 552.72 KiB) ]