Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-08-16 19:43:03

jack_the_pirate
Member
Registered: 2016-09-10
Posts: 37

Need help on reducing line spacing in XFCE context menu

Hi,

I need help on reducing line spacing in XFCE context menu.

I use many custom actions, so I prefer to less line spacing.
In XFCE 4.10 the line spacing was good.
In XFCE 4.12 the line spacing is bigger and I would like to decrease it.

Can you help?


Queen - Megadeth - Metallica - 80's

Offline

#2 2019-08-20 07:51:11

jack_the_pirate
Member
Registered: 2016-09-10
Posts: 37

Re: Need help on reducing line spacing in XFCE context menu

Bump


Queen - Megadeth - Metallica - 80's

Offline

#3 2019-08-20 10:50:04

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,830

Re: Need help on reducing line spacing in XFCE context menu

For which component of Xfce are you trying to adjust this for and what are the versions of those components (need to confirm that you are using GTK2 versions). Or is it for all menu items in the whole DE?

Assuming gtk2, and assuming you want to do this Xfce-wide, try something like this in ~/.gtkrc-2.0:

style "menu-width"
{
   xthickness = 0
   ythickness = 0
}
widget_class "*<GtkMenuItem>*" style "menu-width"

Offline

#4 2019-08-20 13:43:12

jack_the_pirate
Member
Registered: 2016-09-10
Posts: 37

Re: Need help on reducing line spacing in XFCE context menu

ToZ wrote:
style "menu-width"
{
   xthickness = 0
   ythickness = 0
}
widget_class "*<GtkMenuItem>*" style "menu-width"

This didn't do anything neutral


ToZ wrote:

For which component of Xfce are you trying to adjust this for and what are the versions of those components (need to confirm that you are using GTK2 versions). Or is it for all menu items in the whole DE?

The only thing I am trying to adjust here is the height of my:
Thunar right-click menu

also known as:
Thunar context menu

if appears when you click with your mouse right button inside any folder

it starts with
"Create Folder"
"Create Document"
"Paste"

and afterwards presents all the custom actions, until in the end:
"Zoom in"
"Normal"
"Zoom out"
"Properties"

I use 44 Thunar custom actions.
So, my Thunar right-click menu (or context menu) is big (big height, I mean) because of all the entries in it to each one of my 44 custom actions.

When I was using Debian 8 with XFCE 4.10, the total height of my Thunar right-click menu was big, but acceptable (about 35 centimeters in vertical, in my monitor).

But now that I upgraded to Debian 10 with XFCE 4.12, the total height of my Thunar right-click menu became bigger because of the line spacing between each row of the right-click menu (that includes my custom actions) is now bigger (total height is about 45 centimeters in vertical).
Whereas before the line spacing between each line of the right click menu was about 1 centimeter, now is about 1.2 centimeters.

So, I would like to reduce the line spacing of my Thunar context menu.

How can this be accomplished?


Queen - Megadeth - Metallica - 80's

Offline

#5 2019-08-20 13:57:34

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,830

Re: Need help on reducing line spacing in XFCE context menu

jack_the_pirate wrote:

So, I would like to reduce the line spacing of my Thunar context menu.

How can this be accomplished?

Which version of Thunar are you using?

thunar -V

Which appearance (gtk) theme are you using?

xfconf-query -c xsettings -p /Net/ThemeName

Offline

#6 2019-08-20 14:45:34

jack_the_pirate
Member
Registered: 2016-09-10
Posts: 37

Re: Need help on reducing line spacing in XFCE context menu

ToZ wrote:

Which version of Thunar are you using?

$ thunar -V
Thunar 1.8.4 (Xfce 4.12)

ToZ wrote:

Which appearance (gtk) theme are you using?

$ xfconf-query -c xsettings -p /Net/ThemeName
Raleigh


Queen - Megadeth - Metallica - 80's

Offline

#7 2019-08-20 19:00:57

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,830

Re: Need help on reducing line spacing in XFCE context menu

You're using the GTK3 version of Thunar. In that case, the tweaks should go into ~/.config/gtk-3.0/gtk.css.

However, I can seem to affect a menu change just for thunar's context menu. The following snippet changes menu padding throughout GTK3:

menuitem { padding-top: 0px; padding-bottom: 0px; }

The following snippet affects only thunar's menu bar:

menuitem { padding-top: 0px; padding-bottom: 0px; }

But I cannot figure out how to affect just the context menu. Not sure if it's possible.

Offline

#8 2019-08-21 07:47:34

jack_the_pirate
Member
Registered: 2016-09-10
Posts: 37

Re: Need help on reducing line spacing in XFCE context menu

ToZ wrote:

I can seem to affect a menu change just for thunar's context menu.

I believe you meant:
I can't seem to affect a menu change just for thunar's context menu.


ToZ wrote:

The following snippet changes menu padding throughout GTK3:

menuitem { padding-top: 0px; padding-bottom: 0px; }

The following snippet affects only thunar's menu bar:

menuitem { padding-top: 0px; padding-bottom: 0px; }

Thank you for the code, but these two lines are the same.


Queen - Megadeth - Metallica - 80's

Offline

#9 2019-08-21 08:02:11

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,830

Re: Need help on reducing line spacing in XFCE context menu

Sorry for the errors. The two lines should be:

menuitem { padding-top: 0px; padding-bottom: 0px; }

...and:

.thunar menuitem { padding-top: 0px; padding-bottom: 0px; }

Offline

#10 2019-08-24 01:35:26

jack_the_pirate
Member
Registered: 2016-09-10
Posts: 37

Re: Need help on reducing line spacing in XFCE context menu

ToZ wrote:

Sorry for the errors. The two lines should be:

menuitem { padding-top: 0px; padding-bottom: 0px; }

...and:

.thunar menuitem { padding-top: 0px; padding-bottom: 0px; }

Thank you, I'll try it.


Queen - Megadeth - Metallica - 80's

Offline

Board footer

Powered by FluxBB