Reduce height of rows in TreeView

I would like to reduce the height of rows in a TreeView below the default, but something is preventing me from getting the height to where I would like it to be. Here is my test program:

import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GLib', '2.0')
from gi.repository import Gtk, GLib

class Tester(Gtk.Window):
    def __init__(self):

        model = Gtk.ListStore(str)
        model.append(('hanging text, first value',))
        model.append(('second value',))
        model.append(('third value',))

        cell = Gtk.CellRendererText()
        cell.props.height = 19
        cell.props.ypad = 0 # default value is 2

        col = Gtk.TreeViewColumn()
        col.pack_start(cell, True)
        col.set_attributes(cell, text=0)

        treeview = Gtk.TreeView()

        self.set_default_size(300, 400)
        self.connect_after('destroy', self.on_destroy)

    def on_destroy(self, obj):

tester = Tester()

loop = GLib.MainLoop()

If I drop the height below 19, I lose the descender for the ā€œgā€, but there are still 4-5 pixels above the tallest letter. I tried fiddling with vertical alignment. I used the debugger to look for some css that might be relevant. Does anyone know how I can liberate that space?

Ass basic test you can test this in CSS inspector?
treeview * {

Thanks for your suggestion.

These parameters seem to affect only the header. They have no effect with my test program as it does not display headers.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.