Ubuntu – How to reduce context menu size in Gnome

context menudockgnome

As per shown in following image, after clicking on context menu of Gnome Dock following menu comes.

Can we reduce size between options? Those red mark area can we reduce?

Gnome 3.20 Dash to Dock context menu

Best Answer

I don't know whether/how this can be fixed for the default theme, however, if you're using a custom Shell theme, you can do the following:

Open the gnome-shell.css stylesheet of your theme (could be any Gtk theme that contains a GNOME shell theme):

sudo -H gedit /usr/share/themes/<your-theme>/gnome-shell/gnome-shell.css

Search for the .popup-menu-ornament element and change the height to reduce spacing.

The popup-menu-ornament's are the yellow boxes in this screenshot:

This way I was able to reduce the spacing for the Flat Plat compact theme I'm using.

NOTE: There might be better ways to do this and this might even not work for all themes. Feedback is appreciated.