Commit 4eefe301 authored by Michael Gratton's avatar Michael Gratton 🍸 Committed by Michael Gratton
Browse files

client: Fix packing of Component.ConversationActions

parent 9e641600
......@@ -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) {
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment