aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/PlatGTK.cxx')
-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;