aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-04-29 14:14:09 +1000
committernyamatongwe <unknown>2012-04-29 14:14:09 +1000
commitce09e991a840dfde7b4e3cd181e29d031f9c3296 (patch)
treed3977e8140cbed6d0dca9dd27a1d98b34b96cf16
parentdd0075ffa9b0dd00cc5d670aba65b79db397ac2b (diff)
downloadscintilla-mirror-ce09e991a840dfde7b4e3cd181e29d031f9c3296.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;