I’m trying to get rid of spacing between rows of a GtkTreeView presenting a single list. I managed to do this with a GtkMenu’s items and some iffy CSS, but I cannot find the right properties/CSS-selectors to do the same with a tree view.
The reason I need this is for properly showing directory art in the VICE emulator when previewing a disk image, using the old CBM font as used on their 8-bit machines, below is a screenshot of what I managed to do with the GtkMenu(Item) stuff and a bunch of CSS:
As you can see, the spacing between the rows results in the dir art being broken. (Ignore the PETSCII-to-UTF8 encoding issues, I can fix that). So hopefully someone can point me in the right direction to fix this. I usually stay away from CSS and let the user’s theme handle how the UI looks, but in this case, I’ll have to customize the look of the widget.
Please, don’t use a GtkTreeView to show a grid of data: it’s not what the widget is for. It’s not even what GtkMenu is for, to be honest, and the fact that you made it work does not imply it’s a good idea.
You probably need a custom widget—have you thought about deriving GtkDrawingArea and drawing the data yourself using the appropriate grid?
We need the displayed ‘directory’ to be clickable so we can copy the selected file to a virtual floppy and autostart the file from that floppy.
I suppose I could try a GtkDrawingArea to render the directory, as long as that allows us to get an index of the selected file. Also, what kind of backend does the GtkDrawingArea need, if at all? We’re having some trouble with intel OpenGL drivers not rendering GtkGlArea’s properly (or not at all).