diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-01 22:48:11 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-01 22:48:11 +0000 |
commit | f2e5775380976923a569a42415df0630cc3bae48 (patch) | |
tree | 093b38d6638b3eda6ca45ae93e61188df0465c73 | |
parent | a7164208d3ecbc6672f9d8a9f2ddbd520e0ada75 (diff) | |
parent | 2d3885a44ab3c9c815d15b4f9571c2161599f7fb (diff) | |
download | gtk+-f2e5775380976923a569a42415df0630cc3bae48.tar.gz |
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3506 and #3530
See merge request GNOME/gtk!3024
-rw-r--r-- | docs/reference/gtk/gtk4-builder-tool.xml | 56 | ||||
-rw-r--r-- | gtk/gtkcenterlayout.c | 2 | ||||
-rw-r--r-- | gtk/gtkprintoperation.h | 3 |
3 files changed, 34 insertions, 27 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 @@ -42,34 +42,40 @@ on GtkBuilder .ui files. </para> <para> + The <option>validate</option> command validates the .ui file and reports + errors to stderr. +</para> +<para> + The <option>enumerate</option> command lists all the named objects that + are created in the .ui file. +</para> +<para> + The <option>preview</option> command displays the .ui file. This command + accepts options to specify the ID of the toplevel object and a .css file + to use. +</para> +<para> + The <option>simplify</option> 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. +</para> +<para> + When the <option>--3to4</option> is specified, <option>simplify</option> + 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. +</para> +<para> You should always test the modified .ui files produced by gtk4-builder-tool before using them in production. </para> -</refsect1> - -<refsect1><title>Commands</title> - <para>The following commands are understood:</para> - <variablelist> - <varlistentry> - <term><option>validate</option></term> - <listitem><para>Validates the .ui file and report errors to stderr.</para></listitem> - </varlistentry> - <varlistentry> - <term><option>simplify</option></term> - <listitem><para>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.</para></listitem> - </varlistentry> - <varlistentry> - <term><option>enumerate</option></term> - <listitem><para>Lists all the named objects that are created in the .ui file.</para></listitem> - </varlistentry> - <varlistentry> - <term><option>preview</option></term> - <listitem><para>Preview the .ui file. This command accepts options - to specify the ID of an object and a .css file to use.</para></listitem> - </varlistentry> - </variablelist> +<para> + Note in particular that the conversion + done with <option>--3to4</option> 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. +</para> </refsect1> <refsect1><title>Simplify Options</title> 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; } 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() * |