I am working on gschem , a free software tool for editing electronic circuitry. We recently encountered a problem using a GtkScrolledWindow containing a GtkTextView .
Context
Recent versions of Ubuntu use overlay scroll bars, which means that GtkScrolledWindows no longer sets a minimum height that provides enough space for the old scroll bar (they actually have a minimum height of 0). Likewise, a GtkTextView with no text to display queries with a height of 0. This means that one of the scrollable GtkTextViews in gschem is displayed as one pixel in height, and this is clearly unsuitable.

In the dialog box to the right of the screenshot shown above, pay attention to the invisible widget between the "Value:" label and the "Add" button.
This is reported independently of multiple users - see also error report .
Question
Obviously, we could fix this by doing:
g_object_set (textview, "height-request", 100, NULL);
However, this is rather inelegant and will break for users who set very large font sizes in pixels (for example, users with vision problems or using high-resolution screens).
Ideally, therefore, we want to set the minimum size of the GtkTextView relative to the default font size, for example. say "show at least three lines of text."
Can anyone suggest a reasonable / elegant approach for this?
Peter Brett
source share