[gtk/new-style-menu: 10/14] widget factory: Improve manual popover menu example
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/new-style-menu: 10/14] widget factory: Improve manual popover menu example
- Date: Fri, 7 Jun 2019 15:20:25 +0000 (UTC)
commit 924cb93bcce97a575cce3fde8d32ebbd94884e51
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 6 18:08:13 2019 +0000
widget factory: Improve manual popover menu example
Set up the size group, so things line up.
demos/widget-factory/widget-factory.ui | 35 ++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
---
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index f7d3e515b8..0b6c2db8f1 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -2513,7 +2513,10 @@ microphone-sensitivity-medium-symbolic</property>
<child>
<object class="GtkMenuButton">
<property name="icon-name">view-more-symbolic</property>
+ <property name="popover">new_style_menu</property>
+<!--
<property name="menu-model">new_style_menu_model</property>
+-->
</object>
</child>
</object>
@@ -3524,6 +3527,9 @@ bad things might happen.</property>
<child>
<object class="GtkBox">
<property name="halign">fill</property>
+ <style>
+ <class name="circular-buttons"/>
+ </style>
<child>
<object class="GtkModelButton">
<property name="icon"><object class="GThemedIcon"><property
name="name">printer-symbolic</property></object></property>
@@ -3557,6 +3563,7 @@ bad things might happen.</property>
<object class="GtkModelButton">
<property name="text">Open in New Window</property>
<property name="action-name">app.open-in</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
<child>
@@ -3564,6 +3571,13 @@ bad things might happen.</property>
</child>
<child>
<object class="GtkBox">
+ <style>
+ <class name="inline-buttons"/>
+ </style>
+ <child>
+ <object class="GtkLabel" id="cut_copy_paste_filler">
+ </object>
+ </child>
<child>
<object class="GtkLabel">
<property name="label">Edit</property>
@@ -3601,18 +3615,21 @@ bad things might happen.</property>
<object class="GtkModelButton">
<property name="text">Pin</property>
<property name="action-name">app.pin</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="text">Select Labels…</property>
<property name="action-name">app.labels</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="text">Share…</property>
<property name="action-name">app.share</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
<child>
@@ -3622,6 +3639,7 @@ bad things might happen.</property>
<object class="GtkModelButton">
<property name="text">Basement</property>
<property name="menu-name">basement</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
<child>
@@ -3632,6 +3650,7 @@ bad things might happen.</property>
<property name="text">Large</property>
<property name="action-name">app.size</property>
<property name="action-target">'large'</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
<child>
@@ -3639,6 +3658,7 @@ bad things might happen.</property>
<property name="text">Medium</property>
<property name="action-name">app.size</property>
<property name="action-target">'medium'</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
<child>
@@ -3646,6 +3666,7 @@ bad things might happen.</property>
<property name="text">Small</property>
<property name="action-name">app.size</property>
<property name="action-target">'small'</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
<child>
@@ -3655,6 +3676,7 @@ bad things might happen.</property>
<object class="GtkModelButton">
<property name="text">Move to Trash</property>
<property name="action-name">win.delete</property>
+ <property name="indicator-size-group">main-indicators</property>
</object>
</child>
</object>
@@ -3677,29 +3699,42 @@ bad things might happen.</property>
<object class="GtkModelButton">
<property name="text">Berk</property>
<property name="action-name">app.berk</property>
+ <property name="indicator-size-group">basement-indicators</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="text">Broni</property>
<property name="action-name">app.broni</property>
+ <property name="indicator-size-group">basement-indicators</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="text">Drutt</property>
<property name="action-name">app.drutt</property>
+ <property name="indicator-size-group">basement-indicators</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="text">The Thing Upstairs</property>
<property name="action-name">app.upstairs</property>
+ <property name="indicator-size-group">basement-indicators</property>
</object>
</child>
</object>
</child>
</object>
+ <object class="GtkSizeGroup" id="main-indicators">
+ <property name="mode">horizontal</property>
+ <widgets>
+ <widget name="cut_copy_paste_filler"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup" id="basement-indicators">
+ <property name="mode">horizontal</property>
+ </object>
<menu id="new_style_menu_model">
<section>
<attribute name="display-hint">circular-buttons</attribute>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]