aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-04-29 14:14:09 +1000
committernyamatongwe <devnull@localhost>2012-04-29 14:14:09 +1000
commitbbfa008ef83233ccf5ecc1bc2834d90c29f076b8 (patch)
tree6553b5b1d6ea8a1789e747bf769a1935f8f647e5
parent24e724a524d19227aa07aa345da1fb429e1ded74 (diff)
downloadscintilla-mirror-bbfa008ef83233ccf5ecc1bc2834d90c29f076b8.tar.gz
Fix autocompletion list being too short on GTK+ 3.x.
-rw-r--r--gtk/PlatGTK.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index acaf60a42..7bbd84049 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -1577,6 +1577,11 @@ PRectangle ListBoxX::GetDesiredRect() {
rows = desiredVisibleRows;
GtkRequisition req;
+#if GTK_CHECK_VERSION(3,0,0)
+ // This, apparently unnecessary call, ensures gtk_tree_view_column_cell_get_size
+ // returns reasonable values.
+ gtk_widget_get_preferred_size(GTK_WIDGET(scroller), NULL, &req);
+#endif
int height;
// First calculate height of the clist for our desired visible
@@ -1610,7 +1615,7 @@ PRectangle ListBoxX::GetDesiredRect() {
gtk_widget_size_request(GTK_WIDGET(scroller), &req);
#endif
rc.right = req.width;
- rc.bottom = req.height;
+ rc.bottom = Platform::Maximum(height, req.height);
gtk_widget_set_size_request(GTK_WIDGET(list), -1, -1);
int width = maxItemCharacters;