[geary/mjog/1193-conversation-buttons-resize-race: 2/13] client: Fix packing of Component.ConversationActions
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/1193-conversation-buttons-resize-race: 2/13] client: Fix packing of Component.ConversationActions
- Date: Tue, 13 Apr 2021 08:40:11 +0000 (UTC)
commit 4eefe3013eaa8cf19f44f12e3e321a0cf6ec663a
Author: Michael Gratton <mike vee net>
Date: Sat Apr 10 21:23:59 2021 +1000
client: Fix packing of Component.ConversationActions
.../components-conversation-actions.vala | 8 +++++-
ui/application-main-window.ui | 2 +-
ui/components-conversation-actions.ui | 30 +++++++---------------
ui/components-main-toolbar.ui | 5 ++--
4 files changed, 20 insertions(+), 25 deletions(-)
---
diff --git a/src/client/components/components-conversation-actions.vala
b/src/client/components/components-conversation-actions.vala
index 51e6a145f..8c2fa32a9 100644
--- a/src/client/components/components-conversation-actions.vala
+++ b/src/client/components/components-conversation-actions.vala
@@ -16,6 +16,8 @@ public class Components.ConversationActions : Gtk.Box {
public bool show_response_actions { get; construct; }
+ public bool pack_justified { get; construct; }
+
public FolderPopover copy_folder_menu { get; private set; default = new FolderPopover(); }
public FolderPopover move_folder_menu { get; private set; default = new FolderPopover(); }
@@ -45,7 +47,6 @@ public class Components.ConversationActions : Gtk.Box {
// GObject style constuction to support loading via GTK Builder files
construct {
-
// Assemble the mark menus
Gtk.Builder menu_builder = new Gtk.Builder.from_resource(
"/org/gnome/Geary/components-main-toolbar-menus.ui"
@@ -62,6 +63,11 @@ public class Components.ConversationActions : Gtk.Box {
this.response_buttons.set_visible(this.show_response_actions);
this.mark_copy_move_buttons.set_visible(this.show_conversation_actions);
this.archive_trash_delete_buttons.set_visible(this.show_conversation_actions);
+
+ if (this.pack_justified) {
+ this.archive_trash_delete_buttons.hexpand = true;
+ this.archive_trash_delete_buttons.halign = END;
+ }
}
public void update_trash_button(bool show_trash) {
diff --git a/ui/application-main-window.ui b/ui/application-main-window.ui
index 371accea9..f9c35b654 100644
--- a/ui/application-main-window.ui
+++ b/ui/application-main-window.ui
@@ -108,6 +108,7 @@
<property name="visible">True</property>
<property name="show_conversation_actions">True</property>
<property name="show_response_actions">False</property>
+ <property name="pack_justified">True</property>
<property name="hexpand">True</property>
</object>
</child>
@@ -155,7 +156,6 @@
<property name="visible">True</property>
<property name="show_conversation_actions">False</property>
<property name="show_response_actions">True</property>
- <property name="hexpand">True</property>
</object>
</child>
</object>
diff --git a/ui/components-conversation-actions.ui b/ui/components-conversation-actions.ui
index a64dfbd8c..5471d2847 100644
--- a/ui/components-conversation-actions.ui
+++ b/ui/components-conversation-actions.ui
@@ -3,6 +3,7 @@
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="ComponentsConversationActions" parent="GtkBox">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
@@ -25,7 +26,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -46,7 +47,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -67,7 +68,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
@@ -76,11 +77,6 @@
<class name="linked"/>
</style>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkBox" id="mark_copy_move_buttons">
@@ -100,7 +96,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -119,7 +115,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -138,7 +134,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
@@ -147,11 +143,6 @@
<class name="linked"/>
</style>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
<object class="GtkImage" id="archive_image">
@@ -173,7 +164,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -193,7 +184,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -204,9 +195,6 @@
</object>
<packing>
<property name="pack_type">end</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
</packing>
</child>
</template>
diff --git a/ui/components-main-toolbar.ui b/ui/components-main-toolbar.ui
index f593803bd..0b2dfb107 100644
--- a/ui/components-main-toolbar.ui
+++ b/ui/components-main-toolbar.ui
@@ -167,9 +167,10 @@
</child>
</object>
</child>
- <child>
- <object class="HdySqueezer">
+ <child type="title">
+ <object class="HdySqueezer" id="actions_squeezer">
<property name="visible">True</property>
+ <property name="hexpand">True</property>
<child>
<object class="ComponentsConversationActions" id="full_actions">
<property name="visible">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]