From efbb649eeef3a775527b2beed16c4a45962edce7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 23 Dec 2020 00:48:43 -0500 Subject: [PATCH 1/4] modelbutton: Center titles The centering of titles was broken in b5b81dea7f2eff28. Make it mostly work again by adding an empty end indicator. Related: #3405 --- gtk/gtkmodelbutton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c index b6ce026da9..d01b0dba3b 100644 --- a/gtk/gtkmodelbutton.c +++ b/gtk/gtkmodelbutton.c @@ -489,7 +489,7 @@ update_node_name (GtkModelButton *self) { case GTK_BUTTON_ROLE_TITLE: start_name = "arrow"; - end_name = NULL; + end_name = ""; break; case GTK_BUTTON_ROLE_NORMAL: start_name = NULL; From b0b793dd949b12b38eccc0e89a2923cb193d139e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 23 Dec 2020 08:45:51 -0500 Subject: [PATCH 2/4] menubutton: Correct the css docs We are using menubutton instead of button.popup now. --- gtk/gtkmenubutton.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c index d37ee47fc1..29a320aff3 100644 --- a/gtk/gtkmenubutton.c +++ b/gtk/gtkmenubutton.c @@ -104,8 +104,14 @@ * * # CSS nodes * - * GtkMenuButton has a single CSS node with name button. To differentiate - * it from a plain #GtkButton, it gets the .popup style class. + * |[ + * menubutton + * ╰── button.toggle + * ╰── [content] + *]| + * + * GtkMenuButton has a single CSS node with name menubutton + * which contains a toggle button node. * * # Accessibility * From 4f0c920a8e5f2ff17b3e8e41f241c13745e5ff6a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 23 Dec 2020 08:57:04 -0500 Subject: [PATCH 3/4] fontbutton: Correct the css docs Mention the wrapper fontbutton node. --- gtk/gtkfontbutton.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index dc842eb737..50f86feb54 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -59,7 +59,14 @@ * * # CSS nodes * - * GtkFontButton has a single CSS node with name fontbutton. + * |[ + * fontbutton + * ╰── button.font + * ╰── [content] + *]| + * + * GtkFontButton has a single CSS node with name fontbutton which + * contains a button node with the .font style class. */ typedef struct _GtkFontButtonClass GtkFontButtonClass; From 6bd0dc3e783aa3aa0c9468a63d101e2504e70946 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 23 Dec 2020 09:03:07 -0500 Subject: [PATCH 4/4] colorbutton: Correct the css docs Mention the wrapper colorbutton node. --- gtk/gtkcolorbutton.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index f4f8cc40fb..622cce0b60 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -58,8 +58,15 @@ * * # CSS nodes * - * GtkColorButton has a single CSS node with name button. To differentiate - * it from a plain #GtkButton, it gets the .color style class. + * |[ + * colorbutton + * ╰── button.color + * ╰── [content] + *]| + * + * GtkColorButton has a single CSS node with name colorbutton which + * contains a button node. To differentiate it from a plain #GtkButton, + * it gets the .color style class. */ typedef struct _GtkColorButtonClass GtkColorButtonClass;