linuxmint / nemo

File browser for Cinnamon
GNU General Public License v2.0
1.24k stars 299 forks source link

[Enhancement] Custom spacing in Icon View #3058

Open M3cubo opened 2 years ago

M3cubo commented 2 years ago
 * Nemo version: **5.4.3**
 * Is issue with desktop or windowed nemo? **Windowed nemo**
 * Distribution: **Linux Mint 21**
 * Graphics hardware *and* driver used: **GeForce RTX 3050 Mobile**
 * 32 or 64 bit: **64 bit**

Issue

I just wanted to know if I can increment the spacing between the folders when using the Icon View. (I know that I can change the size, but I'm referring to the margin between them -or, the padding in every one-)

This is the default space:

image

This is what I want:

image

I have been trying to declare rules in css in the file ~/.config/gtk-3.0/gtk.css:

.nemo-canvas-item  {
background: #addddd;
border-radius: 30px;
}

The above code works, as it results in:

image

...But I cannot made changes relative to the size, or the padding, of the Item. I don't know if "nemo-canvas-item" affects only the label, or if the CSS class responsible for that is another one. Or maybe is a parent class which has some "display:grid" or something like that? I don't know. Also, didn't find documentation about this, except random codes like that one.

So, it is possible to change the spacing of the folders with these CSS rules?

donjan commented 2 months ago

I'm struggling with something similar after switching from Nautilus to Nemo. The vertical distance between icons in Nemo is uncomfortably high, no matter the zoom level:

comparison

GTK theming is rather unapproachable for the uninitiated, and even after spending quite a while with GTK_DEBUG=interactive nemo and looking at the Yaru theme (gresource extract /usr/share/themes/Yaru/gtk-3.0/gtk.gresource /com/ubuntu/themes/Yaru/3.0/gtk.css), I can't figure out the setting. As OP notes, .nemo-canvas-item seems to only affect the text label. A pointer to where the icon view padding can be adjusted would be appreciated. Nemo version 6.0.2

mtwebster commented 2 months ago

There's no 'knob' for this stuff.

The spacing is currently hardcoded per zoom level for horizontal spacing. Vertical spacing is also affected by a couple of label settings.

image

(using dconf-editor)

donjan commented 2 months ago

That helped with the vertical spacing. Thank you!

JosephMcc commented 2 months ago

@donjan I actually up the zoom level a bit in Nemo from the default. At a larger zoom, the horizontal spacing is actually much better.

Jeremy7701 commented 2 months ago

Resizing the window width by small amounts has a minor effect on horizontal inter-icon spacing.