Skip to content

Commit

Permalink
gschem: Workaround for zero-height text view bug.
Browse files Browse the repository at this point in the history
This is a temporary workaround for a bug on systems using overlay
scrollbars for GTK+ widgets, where the value editing GtkTextView in
the multi-attribute editing dialog was appearing with zero height.

Obviously, setting the height request to a constant size isn't ideal.
It would be better to set the height request based on the font size,
so that a certain number of lines are displayed.

This should be revisited at a later date.

Affects-bug: lp-876299
  • Loading branch information
peter-b committed Dec 12, 2011
1 parent 523f5bd commit 42182f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gschem/src/x_multiattrib.c
Expand Up @@ -2001,7 +2001,10 @@ static void multiattrib_init(Multiattrib *multiattrib)
"shadow-type",
GTK_SHADOW_IN,
NULL));
/*! \fixme Forcing the size request is a horrible band-aid and
* should be replaced by a better heuristic. */
textview = GTK_WIDGET (g_object_new (GTK_TYPE_TEXT_VIEW,
"height-request", 50,
NULL));
g_signal_connect (textview,
"key_press_event",
Expand Down

0 comments on commit 42182f0

Please sign in to comment.