[gtk/circular-menubutton] Allow circular menubuttons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/circular-menubutton] Allow circular menubuttons
- Date: Tue, 26 Jan 2021 05:20:34 +0000 (UTC)
commit 1cebc4316ba0554a10ee1c10e0ef868ba7076cea
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 26 00:17:08 2021 -0500
Allow circular menubuttons
Fixes #3523
gtk/gtkmenubutton.c | 3 +++
gtk/theme/Adwaita/_common.scss | 1 +
2 files changed, 4 insertions(+)
---
diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c
index 255a11c658..7204544830 100644
--- a/gtk/gtkmenubutton.c
+++ b/gtk/gtkmenubutton.c
@@ -120,6 +120,9 @@
* the menu will appear in. The CSS is expected to provide a suitable
* image for each of these cases using the -gtk-icon-source property.
*
+ * Optionally, the menubutton node can carry the .circular style class
+ * to request a round appearance.
+ *
* # Accessibility
*
* GtkMenuButton uses the #GTK_ACCESSIBLE_ROLE_BUTTON role.
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 05877b1dc7..77790d7528 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -746,6 +746,7 @@ button {
.linked.vertical > & { @extend %linked_vertical; }
+ menubutton.circular &,
&.circular { // force circular button shape
min-width: 32px;
min-height: 32px;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]