Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-07-03 15:30:38

commandlinegamer
Member
Registered: 2025-07-03
Posts: 4
LinuxFirefox 128.0

Panel border colour

I'm attempting to amend the colour of panel borders.

Currently I'm running Xfce 4.16 on Slackware 15.0, and using a theme based on thesquash's revival of Raleigh.

It works pretty well, but one thing still seems problematic.

I prefer an old-fashioned 3d style to window decorations, so my borders generally have a lighter colour on the left and top sides, and darker on the right and bottom edges.

Having done a fair amount of experimenting, I've been able to colour vertical panel borders in the same way as other windows on my desktop, but not for deskbar or horizontal panels. Furthermore, more recent versions of Xfce don't seem to allow vertical panels to be themed this way. (A border width can be specified in the settings, but colour is unaffected by anything in CSS, or elsewhere as far as I can tell.)

Relevant code for the panel is as follows:

/* This works in 4.16 */
.xfce4-panel.vertical
{
  border-left:   2px solid @border_light;
  border-top:    2px solid @border_light;
  border-right:  2px solid @border_dark;
  border-bottom: 2px solid @border_dark;
}

There are a couple of pictures for illustration to show the panel borders when coloured separately, and when the same colour as the main window background.

https://commandlinegamer.org/shared/with-borders.png

https://commandlinegamer.org/shared/without-borders.png


On another machine I'm now testing Xfce 4.20, and the ability to colour borders seems to be absent. I've tried numerous variations on the CSS, using results found here and elsewhere. Is it no longer possible, or am I missing a change to which selectors need to be addressed?

I can provide the full theme if it helps. Any help gratefully received.

Last edited by commandlinegamer (2025-07-03 15:37:31)

Offline

#2 2025-07-03 16:33:27

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,022
LinuxFirefox 140.0

Re: Panel border colour

Hello and welcome.

I don't have access to a 4.16 install to check. However, in Xfce 4.20, ".vertical" and ".deskbar" work for me. ".horizontal" doesn't seem to exist anymore. However, ".panel-1", ".panel-2", etc have been added for you to target specific panels.

Are you still using a theme based on thesquash's revival of Raleigh in 4.20? Can you post a link to it?


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-07-04 09:18:12

commandlinegamer
Member
Registered: 2025-07-03
Posts: 4
LinuxFirefox 128.0

Re: Panel border colour

ToZ wrote:

Hello and welcome.

I don't have access to a 4.16 install to check. However, in Xfce 4.20, ".vertical" and ".deskbar" work for me. ".horizontal" doesn't seem to exist anymore. However, ".panel-1", ".panel-2", etc have been added for you to target specific panels.

Are you still using a theme based on thesquash's revival of Raleigh in 4.20? Can you post a link to it?

Thanks,

The original theme is here:

https://github.com/thesquash/gtk-theme-raleigh

My adaptation, which I'm using on 4.16 and am testing on 4.20 is here:

https://commandlinegamer.org/shared/zigguratplum.tar.gz

The relevant file is Ziggurat_Plum/gtk-3.24/application-styles/xfpanel.css and it currently looks like this:

/* This works, but we don't want to set the background here.

.panel-1
{
  background-color: #ff88ff;
}
*/


/* This is what we would like to be able to do (the colours below
   are only for testing purposes), but doesn't work */

.panel-1
{
  border-left: 2px solid #aa2020;
  border-top: 2px solid #2020aa;
  border-right: 2px solid #20aa20;
  border-bottom: 2px solid #aaaa20;
}

Offline

#4 2025-07-04 12:26:20

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,022
LinuxFirefox 140.0

Re: Panel border colour

Which plugins are those in your screenshot in the original post? Looks like Window Buttons (tasklist). Using a similar setup (tasklist + 1 launcher) and your theme I get:
Screenshot-2025-07-04-08-21-58.jpg

Note that I added a "#tasklist-12>box" widget element hierarchy to get the border to surround the window buttons plugin. The "12" will vary from system to system - you can get your element ID by:

xfconf-query -c xfce4-panel -lv | grep tasklist

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-07-04 13:13:03

commandlinegamer
Member
Registered: 2025-07-03
Posts: 4
LinuxFirefox 128.0

Re: Panel border colour

In the meantime I've been using GTK inspector by doing

xfce4-panel -q
GTK_DEBUG=interactive xfce4-panel &

If I use the option to enter live CSS, I can indeed get border colours, e.g.

.panel-1
{
  border-top: 2px solid #ff00ff;
 /* etc */
}

It seems to suggest an issue with the theme. I'll try your suggestion shortly.

Offline

#6 2025-07-04 13:46:04

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,022
LinuxFirefox 140.0

Re: Panel border colour

commandlinegamer wrote:

In the meantime I've been using GTK inspector by doing

As an FYI, I find it easier to enable the inspector keyboard shortcut via:

gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true

...then right-clicking on the panel to display the popup menu then pressing Ctrl + Shift + I to open the inspector window for just that panel. Saves you the headache of having to deal with all the other open windows when you start xfce4-panel your way.

If I use the option to enter live CSS, I can indeed get border colours, e.g.

So perhaps something in the theme is overriding it later on in the theme code. Try adding these snippets to ~/.config/gtk-3.0/gtk.css and they will be processed after the theme is loaded.


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-07-04 14:58:20

commandlinegamer
Member
Registered: 2025-07-03
Posts: 4
LinuxFirefox 128.0

Re: Panel border colour

ToZ wrote:

So perhaps something in the theme is overriding it later on in the theme code. Try adding these snippets to ~/.config/gtk-3.0/gtk.css and they will be processed after the theme is loaded.

Indeed, that works, thanks.

I need to solve the mystery of what's going on in the theme.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 574.97 KiB (Peak: 591.81 KiB) ]