Fix generic wxWindow when used in toolbar
GtkToolbar uses item minimum size as actual size, so don't use 0 as minimum
for toolbar children.
See #17756, #17704
(cherry picked from commit 2155eb2fde
)
This commit is contained in:
@@ -230,7 +230,12 @@ static void pizza_adjust_size_request(GtkWidget* widget, GtkOrientation orientat
|
||||
parent_class->adjust_size_request(widget, orientation, minimum, natural);
|
||||
// Override adjustments to minimum size. GtkWidgetClass.adjust_size_request()
|
||||
// will use the size request, if set, as the minimum.
|
||||
*minimum = 0;
|
||||
// But don't override if in a GtkToolbar, it uses the minimum as actual size.
|
||||
GtkWidget* parent = gtk_widget_get_parent(widget);
|
||||
if (parent)
|
||||
parent = gtk_widget_get_parent(parent);
|
||||
if (!GTK_IS_TOOL_ITEM(parent))
|
||||
*minimum = 0;
|
||||
}
|
||||
|
||||
// Needed to implement GtkScrollable interface, but we don't care about the
|
||||
|
Reference in New Issue
Block a user