Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-07-27 17:18:36

espas
Member
Registered: 2021-09-29
Posts: 27

[SOLVED] Add some spacing in xfce4-panel edges

Is it possible to add some spacing at the edges of the Xfce panel without adding a separator? A separator feels like too much spacing but without the separator the first and last elements of the panel are too close to the screen edge and it doesn't feel right

Last edited by espas (2022-07-28 18:55:37)

Offline

#2 2022-07-27 17:31:26

KBar
Moderator
Registered: 2021-11-05
Posts: 537

Re: [SOLVED] Add some spacing in xfce4-panel edges

Yes, it is. Can you provide a screenshot of your panel? You can use xfce4-screenshooter.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#3 2022-07-28 08:19:31

espas
Member
Registered: 2021-09-29
Posts: 27

Re: [SOLVED] Add some spacing in xfce4-panel edges

KBar wrote:

Yes, it is. Can you provide a screenshot of your panel? You can use xfce4-screenshooter.

3C2pSu8.png

I want to know if there is a way to add some margin to the edges without adding a separator (like it has now).

Offline

#4 2022-07-28 09:25:43

KBar
Moderator
Registered: 2021-11-05
Posts: 537

Re: [SOLVED] Add some spacing in xfce4-panel edges

Yes, there is. It looks like you have tasklist on the left and clock on the right. Add the following to your ~/.config/gtk-3.0/gtk.css (create if doesn't exist):

#tasklist-2 > .horizontal {
	padding-left: INSERT_INTEGERpx;
}

#clock-button {
	margin-right: INSERT_INTEGERpx;
}

The digit in the end of tasklist- can be found by hovering over its entry in Panel Preferences…Items tab:
9p455S6l.png

Restart the panel:

xfce4-panel -r

As long as you don't add new or remove existing items, you're safe.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#5 2022-07-28 13:48:37

espas
Member
Registered: 2021-09-29
Posts: 27

Re: [SOLVED] Add some spacing in xfce4-panel edges

Didn't work. I have 2 monitors and 2 panels and I need to do the same on the other one for the whisker-menu and clock. When I change the theme to Flat-Remix the Whisker Menu doesn't stay right on the edge of the screen, there is some padding between the menu and the edge, is there a way to change this in the theme settings?

Honestly, the tasklist thing doesn't annoy me. I just want to add some padding to whisker menu and both clocks.

Last edited by espas (2022-07-28 13:50:55)

Offline

#6 2022-07-28 14:42:07

KBar
Moderator
Registered: 2021-11-05
Posts: 537

Re: [SOLVED] Add some spacing in xfce4-panel edges

espas wrote:

Didn't work.

What do you mean by that exactly? Did you remove both separators? Did you try setting a higher value to see if affects anything? What's the content of gtk.css and what is your current GTK theme?

I have 2 monitors and 2 panels and I need to do the same on the other one for the whisker-menu and clock.

This information certainly would have helped from the beginning. How does the second panel look? Is it horizontal, vertical, a deskbar?

When I change the theme to Flat-Remix the Whisker Menu doesn't stay right on the edge of the screen, there is some padding between the menu and the edge, is there a way to change this in the theme settings?

There isn't. Only through GTK CSS.

Honestly, the tasklist thing doesn't annoy me. I just want to add some padding to whisker menu and both clocks.

I don't see any Whisker Menu in your screenshot, unless I'm blind or you deliberately cut it out.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#7 2022-07-28 15:49:48

espas
Member
Registered: 2021-09-29
Posts: 27

Re: [SOLVED] Add some spacing in xfce4-panel edges

Sorry, I just sent the second monitor panel. I thought the solution would be a simple thing that would fix it, didn't think it would be related to the elements in the panel.
I did remove both separators.

RmAQfsA.png

This is how both panels look like. Inside the red circles are the elements I need to fix (Whisker Menu and both clocks).

Btw, sending both panels make it very hard to see.

Last edited by espas (2022-07-28 15:51:39)

Offline

#8 2022-07-28 16:30:35

KBar
Moderator
Registered: 2021-11-05
Posts: 537

Re: [SOLVED] Add some spacing in xfce4-panel edges

What version of Xfce are you running?

xfce4-about -V
espas wrote:

I thought the solution would be a simple thing that would fix it, didn't think it would be related to the elements in the panel.

The simple solution is too use separators, or unlock the panels.

This is how both panels look like. Inside the red circles are the elements I need to fix (Whisker Menu and both clocks).

This is on Debian 11 (though it should get picked up on anything, as long as Xfce >= 4.14):
lfufsaKl.pngbOM2mdgl.png
BwYaqcYl.pngXNeNH67l.png

Btw, sending both panels make it very hard to see.

Right. You can select an area to screenshot and prevent unrelated stuff from showing up.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#9 2022-07-28 16:47:10

espas
Member
Registered: 2021-09-29
Posts: 27

Re: [SOLVED] Add some spacing in xfce4-panel edges

KBar wrote:

What version of Xfce are you running?

xfce4-about -V

xfce4-about 4.16.1 (Xfce 4.16)

I must be doing something wrong because this isn't working

1YqlBPQ.png

Do you know why this has no effect?

Offline

#10 2022-07-28 17:07:55

KBar
Moderator
Registered: 2021-11-05
Posts: 537

Re: [SOLVED] Add some spacing in xfce4-panel edges

Are you restarting the panels afterwards?

The existing rules aren't that relevant, but it wouldn't hurt to comment them out and test again. Also try the name of their parents instead, i.e.

/* comment out everything above and just leave these two
*/
#whiskermenu-15 button { background-color: red; margin-left: 10px; }
#clock-12 button { background-color: red; margin-right: 10px; }

Again, replace these numbers with whatever appears as their internal names in your item list (even easier with GTK Inspector).


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#11 2022-07-28 18:00:49

espas
Member
Registered: 2021-09-29
Posts: 27

Re: [SOLVED] Add some spacing in xfce4-panel edges

#whiskermenu-28 button { margin-left: 10px; }

is working for me, but the clock one isn't.

#clock-3 button { margin-right 10px; } 

is not working. The internal names are right.

Offline

#12 2022-07-28 18:06:31

KBar
Moderator
Registered: 2021-11-05
Posts: 537

Re: [SOLVED] Add some spacing in xfce4-panel edges

Did the background color change at least? You have two clocks, you need to use different selectors for each. How about:

#clock-3 button { padding-right: 10px; }

or

#clock-3 button { margin-left: -10px; }

Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#13 2022-07-28 18:13:53

espas
Member
Registered: 2021-09-29
Posts: 27

Re: [SOLVED] Add some spacing in xfce4-panel edges

KBar wrote:

Did the background color change at least?

The background changes but neither the margin-right, padding-right or margin-left using negative numbers is working.

Offline

#14 2022-07-28 18:28:58

KBar
Moderator
Registered: 2021-11-05
Posts: 537

Re: [SOLVED] Add some spacing in xfce4-panel edges

At least now we know that selectors "are working" and not "not working". At this point, I'd suggest creating a new user and trying out your panel layout there. Maybe even try moving the clock to another slot, away from the rightmost position and see if the right margin appears. Could be related to System Load Monitor (doubt). Or a simple typo in the selector (wouldn't hurt to double-check).

As a last resort, try:

#clock-3 button { border-right: 10px solid alpha(white, 0.0); }

Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#15 2022-07-28 18:32:33

espas
Member
Registered: 2021-09-29
Posts: 27

Re: [SOLVED] Add some spacing in xfce4-panel edges

KBar wrote:

As a last resort, try:

#clock-3 button { border-right: 10px solid alpha(white, 0.0); }

This command works. I don't understand what it is doing though.

Offline

#16 2022-07-28 18:55:24

espas
Member
Registered: 2021-09-29
Posts: 27

Re: [SOLVED] Add some spacing in xfce4-panel edges

Anyways, the issue is solved.

Thank you very much, KBar.

Offline

#17 2022-07-28 19:30:48

KBar
Moderator
Registered: 2021-11-05
Posts: 537

Re: [SOLVED] Add some spacing in xfce4-panel edges

espas wrote:

I don't understand what it is doing though.

It draws a transparent (value of alpha channel of any color set to 0 produces full transparency) border to the right of the selected element.

Thank you very much, KBar.

You're most welcome.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

Board footer

Powered by FluxBB