You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
30 lines
1.0 KiB
From 2bc3721f065fd7d47674ccaf7e8d9d6cc195aab5 Mon Sep 17 00:00:00 2001
|
|
From: Paul Cornett <paulcor@users.noreply.github.com>
|
|
Date: Sat, 6 Feb 2016 08:58:53 -0800
|
|
Subject: [PATCH] Fix GetBestSize() for GTK3 after size has been set
|
|
|
|
Need to reset size request to get actual best size.
|
|
See Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=1282142
|
|
|
|
(cherry picked from commit 6ed7e27bf270f9f7767b59ebaa9a7f37c5bb3bed)
|
|
---
|
|
src/gtk/control.cpp | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp
|
|
index 3352965..20cd746 100644
|
|
--- a/src/gtk/control.cpp
|
|
+++ b/src/gtk/control.cpp
|
|
@@ -319,7 +319,11 @@ wxSize wxControl::GTKGetPreferredSize(GtkWidget* widget) const
|
|
{
|
|
GtkRequisition req;
|
|
#ifdef __WXGTK3__
|
|
+ int w, h;
|
|
+ gtk_widget_get_size_request(widget, &w, &h);
|
|
+ gtk_widget_set_size_request(widget, -1, -1);
|
|
gtk_widget_get_preferred_size(widget, NULL, &req);
|
|
+ gtk_widget_set_size_request(widget, w, h);
|
|
#else
|
|
GTK_WIDGET_GET_CLASS(widget)->size_request(widget, &req);
|
|
#endif
|