From 0b6359e6978d4609871f0d1d1abca2eebe554938 Mon Sep 17 00:00:00 2001 From: gambas Date: Sat, 7 Nov 2020 00:45:17 +0100 Subject: [PATCH] Fix the workaround on TabStrip layout error messages. [GB.GTK3] * BUG: Fix the workaround on TabStrip layout error messages. --- gb.gtk/src/gcontainer.cpp | 5 +++-- gb.gtk/src/gcontrol.cpp | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gb.gtk/src/gcontainer.cpp b/gb.gtk/src/gcontainer.cpp index 1fba4b922..75eb3366a 100644 --- a/gb.gtk/src/gcontainer.cpp +++ b/gb.gtk/src/gcontainer.cpp @@ -512,10 +512,11 @@ int gContainer::clientWidth() if ((width() != a.width || height() != a.height) && a.width > 0 && a.height > 0) { + //g_debug("clientWidth: %s: %d", name(), width()); a.x = x(); a.y = y(); a.width = width(); a.height = height(); - //gt_disable_warnings(true); + gt_disable_warnings(true); gtk_widget_size_allocate(widget, &a); - //gt_disable_warnings(false); + gt_disable_warnings(false); } //g_debug("ClientWidth: %s -> %d", this->name(), cont->allocation.width); diff --git a/gb.gtk/src/gcontrol.cpp b/gb.gtk/src/gcontrol.cpp index 17482ca99..a27b3c6fd 100644 --- a/gb.gtk/src/gcontrol.cpp +++ b/gb.gtk/src/gcontrol.cpp @@ -1710,7 +1710,7 @@ static bool must_patch(GtkWidget *widget) GtkWidget *parent; gControl *parent_control; - if (GTK_IS_ENTRY(widget) || GTK_IS_FIXED(widget)) + if (GTK_IS_ENTRY(widget)) // || GTK_IS_FIXED(widget)) return true; if (gt_get_control(widget)) @@ -1719,6 +1719,9 @@ static bool must_patch(GtkWidget *widget) parent = gtk_widget_get_parent(widget); if (!parent) return false; + + if (GTK_IS_NOTEBOOK(parent) && GTK_IS_FIXED(widget)) + return true; if (GTK_IS_SCROLLED_WINDOW(parent)) {