[libadwaita/wip/exalm/less-selectors] button-content: Update for menu button changes
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/less-selectors] button-content: Update for menu button changes
- Date: Thu, 11 Nov 2021 09:40:51 +0000 (UTC)
commit 9a216f556f2c7cbc1ecc5650fee5eeb0eb0b9a1c
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Nov 11 14:40:03 2021 +0500
button-content: Update for menu button changes
It needs to add a style class to the button. Since that button is internal,
it needs to do that with GtkMenuButton itself now.
src/adw-button-content.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/adw-button-content.c b/src/adw-button-content.c
index cbe4ea98..91eb355f 100644
--- a/src/adw-button-content.c
+++ b/src/adw-button-content.c
@@ -49,9 +49,8 @@
* `AdwSplitButton`'s CSS node is called `buttoncontent`. It contains the
* subnodes `image` and `label`.
*
- * When inside a `GtkButton` or `AdwSplitButton`, the button will receive the
- * `.image-text-button` style class. When inside a `GtkMenuButton`, the
- * internal `GtkButton` will receive it instead.
+ * When inside a `GtkButton`, `GtkMenuButton` or `AdwSplitButton`, the button
+ * will receive the `.image-text-button` style class.
*
* ## Accessibility
*
@@ -101,9 +100,8 @@ adw_button_content_root (GtkWidget *widget)
self->button = gtk_widget_get_ancestor (GTK_WIDGET (self), GTK_TYPE_BUTTON);
- /* For AdwSplitButton we want to style the split button widget and not the
- * button inside. */
- if (ADW_IS_SPLIT_BUTTON (gtk_widget_get_parent (self->button)))
+ if (GTK_IS_MENU_BUTTON (gtk_widget_get_parent (self->button)) ||
+ ADW_IS_SPLIT_BUTTON (gtk_widget_get_parent (self->button)))
self->button = gtk_widget_get_parent (self->button);
gtk_widget_add_css_class (self->button, "image-text-button");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]