What would be the CSS selector for the "row-spacing" property of the freehand tool options?

Tags: #<Tag:0x00007f2492ec4038> #<Tag:0x00007f2495777e58> #<Tag:0x00007f2495777c78>

I’m trying to “hack” gtk.css to make the GUI more compact. No actual so-called “compact” GTK theme is really minimally compact in this regard, actually the most compact thing I’ve found so far was my own custom modification on Numix theme, with the aid of a tool called “ooomox” and some manual editing.

I can’t manage to find it on the GTK inspector, tried in the default Debian Buster (10) version and one of the latest appimages.

If you click that thing that “aims” at some element in the GUI and then display its properties, some of which you can even change on the fly (like row-spacing), the freehand tool options will have a property called “row-spacing”, that defaults at “6,” in both versions (even though the Debian/older version it seems more compact), but I can’t find what I’d put on the CSS tab to try to change the same property to zero, to hopefully add it to my own gtk.css file, whether that’s the general one or a specific to MyPaint, somehow.

I’m using MyPaint under lxqt (and before that, “plain openbox,” to which I wish to return soon), but while I don’t have a Gnome session installed, from screen captures on the internet, it doesn’t look as if the GTK3 theme(s) are significantly less overly-padded on Gnome itself.

That spacing is hardcoded (not for any particular reason) in the PaintingModeOptionsWidgetBase class. Those instances should really be changed to use proper css styles/classes on some rainy or snowy day.

1 Like

“Those instances should really be changed to use proper css styles/classes” – do you mean that even though the GTK inspector can change that value “on the fly,” there’s no actual CSS code that can be used in gtk.css that would achieve the same?
I’m asking because I tried:

PaintingModeOptionsWidgetBase { row-spacing: 0 ; }

But maybe that’s the wrong syntax. There are many different ways these kind of things are expressed, I don’t know how much of it is just equivalent or actual different syntaxes for different things and whatnot.

I should have been clearer: PaintingModeOptionsWidgetBase is a python class (in gui/mode.py) extending/deriving Gtk.Grid, and the row spacing is set by set_row_spacing(). I don’t think you can override that with css.

1 Like

Thanks. Somewhat disappointing that it can be changed with the inspector, but not with a config file.