[libadwaita/wip/exalm/expand] button-content: Don't expand icon when a label is visible
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/expand] button-content: Don't expand icon when a label is visible
- Date: Fri, 10 Sep 2021 19:52:32 +0000 (UTC)
commit e947ca63d57d65ef45383ff4cd65c95c7695ed05
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Sep 11 00:52:07 2021 +0500
button-content: Don't expand icon when a label is visible
We only want to expand it when there's no label, so it's centered. When
there's a label, we want to left align it instead.
src/adw-button-content.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/adw-button-content.c b/src/adw-button-content.c
index 828992ea..c73e102e 100644
--- a/src/adw-button-content.c
+++ b/src/adw-button-content.c
@@ -385,6 +385,7 @@ adw_button_content_set_label (AdwButtonContent *self,
gtk_label_set_label (GTK_LABEL (self->label), label);
gtk_widget_set_visible (self->label, label[0]);
+ gtk_widget_set_hexpand (self->icon, !label[0]);
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_LABEL]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]