You are not logged in.
There are plenty of themes that make the top corners of windows rounded, but I'm not finding any that make the panel corners rounded (assuming the panel in question is in "shrink to fit" mode of course).
Is it possible to theme the panels in this way?
Last edited by mykai (2021-08-16 04:05:56)
Offline
You can use a tweak like this in ~/.config/gtk-3.0/gtk.css:
.xfce4-panel {
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
...adjust the values to suit and restart the panel for it to take effect:
xfce4-panel -r
Note: adding transparent separators to the front and back end of the panel help to prevent widget overlap.
Offline
is the xfce4-panel command a new thing in 4.16?
Offline
is the xfce4-panel command a new thing in 4.16?
It's a GTK3 tweak, so it would have been available since 4.14 - when the switch to GTK3 happened.
Offline
I guess I should have been more clear, is there a way to target the panels separately? Are the different panels targetable using nth-child tricks? (I'm waiting to install the gtk inspector thing while I figure out my gradients bug)
Offline
I guess I should have been more clear, is there a way to target the panels separately? Are the different panels targetable using nth-child tricks? (I'm waiting to install the gtk inspector thing while I figure out my gradients bug)
Unfortunately no - separate panels are not distinguishable between each other with respect to CSS.
Edit: it is somewhat possible. See post #11 below.
Last edited by ToZ (2022-06-12 16:32:18)
Offline
Hmmm..... CSS is fairly powerful though (assuming gtk is using the full thing and not some stripped version). How are the panels positioned internally? Like, do they get CSS position attributes attached to them at all? Can you target *[position="absolute"][top="123px"] ?
Obviously this kind of hard coding is super fragile and would break if you ever moved the panel or anything, but for my private local use I can deal with that.
Offline
Panel positioning is managed through the xfconf backend. Have a read through this thread where that setting is discussed.
Offline
OK thanks. Now that I figured out the gradient issue I'll try to start messing with this. Thanks for all your help in everything btw.
Offline
Is it possible to only target 1 panel? Like panel 1? I tried but could not figure how.
Offline
If you have panels with different orientations (horizontal/vertical/deskbar), you can use the ".horizontal" or ".vertical" or
.deskbar" style class to target them:
.xfce4-panel.horizontal {background-color: red}
.xfce4-panel.vertical {background-color: green}
.xfce4-panel.deskbar {background-color: blue}
(tested on Xfce 4.16).
Offline
Thank you very much!
Offline