aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColomban Wendling <ban@herbesfolles.org>2015-06-02 14:45:22 +0200
committerColomban Wendling <ban@herbesfolles.org>2015-06-02 14:45:22 +0200
commitcbef5dafccc2bf6ff100d9694c1e6afdb8241619 (patch)
tree9c7a3341d28b8d10975b42f71a631f7ea7b6b26f
parent6343b8cacc03db5529d07ad63aa36fc83fd9b4d7 (diff)
downloadscintilla-mirror-cbef5dafccc2bf6ff100d9694c1e6afdb8241619.tar.gz
GTK: Fix runtime completion popup warning
GtkScrolledWindow in GTK 3.16 might have a minimum and natural height of 0 if GTK_OVERLAY_SCROLLING is enabled (which is the default), so we need to fix our overridden minimal height to never be greater than the natural height. Do that by only changing the minimal height if it is greater than what we want. I don't know why we didn't use to set 0 here, but it might be that a height of 0 caused problems on older GTK versions, so keep 1 to be sure.
-rw-r--r--gtk/PlatGTK.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 63d0c466d..f91fbdbe0 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -1514,7 +1514,8 @@ G_DEFINE_TYPE(SmallScroller, small_scroller, GTK_TYPE_SCROLLED_WINDOW)
#if GTK_CHECK_VERSION(3,0,0)
static void small_scroller_get_preferred_height(GtkWidget *widget, gint *min, gint *nat) {
GTK_WIDGET_CLASS(small_scroller_parent_class)->get_preferred_height(widget, min, nat);
- *min = 1;
+ if (*min > 1)
+ *min = 1;
}
#else
static void small_scroller_size_request(GtkWidget *widget, GtkRequisition *req) {