From a4baac71935ed4013b5c8878b9f8936544f22a7f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 1 Jan 2021 09:40:40 -0500 Subject: [PATCH 1/3] docs: Complete a sentence Fixes: #3530 --- gtk/gtkprintoperation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtkprintoperation.h b/gtk/gtkprintoperation.h index e36d9155b0..87085646d5 100644 --- a/gtk/gtkprintoperation.h +++ b/gtk/gtkprintoperation.h @@ -307,7 +307,8 @@ GtkPageSetup *gtk_print_run_page_setup_dialog (GtkWindow /** * GtkPageSetupDoneFunc: - * @page_setup: the #GtkPageSetup that has been + * @page_setup: the #GtkPageSetup that has been passed to + * gtk_print_run_page_setup_dialog_async() * @data: (closure): user data that has been passed to * gtk_print_run_page_setup_dialog_async() * From 572649740e58d7c9cd5d42e732b8fbf6c93290f3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 1 Jan 2021 10:14:01 -0500 Subject: [PATCH 2/3] docs: Flesh out the gtk4-builder-tool man page Add some details about the --3to4 conversion, and set expectations. --- docs/reference/gtk/gtk4-builder-tool.xml | 56 +++++++++++++----------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/docs/reference/gtk/gtk4-builder-tool.xml b/docs/reference/gtk/gtk4-builder-tool.xml index 992f2d9db1..c6c6d1ae70 100644 --- a/docs/reference/gtk/gtk4-builder-tool.xml +++ b/docs/reference/gtk/gtk4-builder-tool.xml @@ -41,35 +41,41 @@ gtk4-builder-tool can perform various operations on GtkBuilder .ui files. + + The command validates the .ui file and reports + errors to stderr. + + + The command lists all the named objects that + are created in the .ui file. + + + The command displays the .ui file. This command + accepts options to specify the ID of the toplevel object and a .css file + to use. + + + The command simplifies the .ui file by removing + properties that are set to their default values and writes the resulting XML + to stdout, or back to the input file. + + + When the is specified, + interprets the input as a GTK 3 ui file and attempts to convert it to GTK 4 + equivalents. It performs various conversions, such as renaming properties, + translating child properties to layout properties, rewriting the setup for + GtkNotebook, GtkStack, GtkAssistant or changing toolbars into boxes. + You should always test the modified .ui files produced by gtk4-builder-tool before using them in production. - - -Commands - The following commands are understood: - - - - Validates the .ui file and report errors to stderr. - - - - Simplifies the .ui file by removing properties that - are set to their default values and write the resulting XML to stdout, - or back to the input file. - - - - Lists all the named objects that are created in the .ui file. - - - - Preview the .ui file. This command accepts options - to specify the ID of an object and a .css file to use. - - + + Note in particular that the conversion + done with is meant as a starting point for a port + from GTK 3 to GTK 4. It is expected that you will have to do manual fixups + after the initial conversion. + Simplify Options From 2d3885a44ab3c9c815d15b4f9571c2161599f7fb Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 1 Jan 2021 11:02:57 -0500 Subject: [PATCH 3/3] center layout: Fix handling of expanding center child We were not taking spacing into account when adjusting the size of an expanding center child, causing it to slip under the end child at times. Fixes: #3506 --- gtk/gtkcenterlayout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkcenterlayout.c b/gtk/gtkcenterlayout.c index f9fa988ca7..b2dee1db0d 100644 --- a/gtk/gtkcenterlayout.c +++ b/gtk/gtkcenterlayout.c @@ -177,7 +177,7 @@ gtk_center_layout_distribute (GtkCenterLayout *self, center_pos = size - center_size - end_size - spacing; else if (center_expand) { - center_size = size - 2 * MAX (start_size, end_size); + center_size = size - 2 * (MAX (start_size, end_size) + spacing); center_pos = (size / 2) - (center_size / 2) + spacing; }