[geary/mjog/1193-conversation-buttons-resize-race: 3/11] client: Convert to using HdySqueezer for managing main toolbar actions
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/1193-conversation-buttons-resize-race: 3/11] client: Convert to using HdySqueezer for managing main toolbar actions
- Date: Sun, 11 Apr 2021 06:52:45 +0000 (UTC)
commit 7240d9e20dc8f07fc4f8bf2a6e6b0cad1222f0b8
Author: Michael Gratton <mike vee net>
Date: Sat Apr 10 21:23:39 2021 +1000
client: Convert to using HdySqueezer for managing main toolbar actions
src/client/application/application-main-window.vala | 6 ++++--
src/client/components/components-main-toolbar.vala | 3 ++-
ui/components-main-toolbar.ui | 19 ++++++++++++++++---
3 files changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/src/client/application/application-main-window.vala
b/src/client/application/application-main-window.vala
index d47a15690..d124c583d 100644
--- a/src/client/application/application-main-window.vala
+++ b/src/client/application/application-main-window.vala
@@ -1527,7 +1527,8 @@ public class Application.MainWindow :
this.conversation_list_view.select_conversations(to_select);
this.conversation_list_actions.selected_conversations = to_select.size;
- this.main_toolbar.conversation_actions.selected_conversations = to_select.size;
+ this.main_toolbar.full_actions.selected_conversations = to_select.size;
+ this.main_toolbar.compact_actions.selected_conversations = to_select.size;
if (this.selected_folder != null && !this.has_composer) {
switch(to_select.size) {
@@ -1780,7 +1781,8 @@ public class Application.MainWindow :
this.selected_folder_supports_trash
);
this.conversation_list_actions.update_trash_button(show_trash);
- this.main_toolbar.conversation_actions.update_trash_button(show_trash);
+ this.main_toolbar.full_actions.update_trash_button(show_trash);
+ this.main_toolbar.compact_actions.update_trash_button(show_trash);
}
private async void update_context_dependent_actions(bool sensitive) {
diff --git a/src/client/components/components-main-toolbar.vala
b/src/client/components/components-main-toolbar.vala
index 1edf9d4f5..98a62730a 100644
--- a/src/client/components/components-main-toolbar.vala
+++ b/src/client/components/components-main-toolbar.vala
@@ -25,7 +25,8 @@ public class Components.MainToolbar : Hdy.Leaflet {
public bool find_open { get; set; default = false; }
- [GtkChild] public unowned ConversationActions conversation_actions;
+ [GtkChild] public unowned ConversationActions full_actions;
+ [GtkChild] public unowned ConversationActions compact_actions;
[GtkChild] private unowned Hdy.Leaflet conversations_leaflet;
diff --git a/ui/components-main-toolbar.ui b/ui/components-main-toolbar.ui
index 00104224a..f40880ce6 100644
--- a/ui/components-main-toolbar.ui
+++ b/ui/components-main-toolbar.ui
@@ -168,10 +168,23 @@
</object>
</child>
<child>
- <object class="ComponentsConversationActions" id="conversation_actions">
+ <object class="HdySqueezer">
<property name="visible">True</property>
- <property name="show_conversation_actions">True</property>
- <property name="show_response_actions">True</property>
+ <property name="transition_type">crossfade</property>
+ <child>
+ <object class="ComponentsConversationActions" id="full_actions">
+ <property name="visible">True</property>
+ <property name="show_conversation_actions">True</property>
+ <property name="show_response_actions">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="ComponentsConversationActions" id="compact_actions">
+ <property name="visible">True</property>
+ <property name="show_conversation_actions">True</property>
+ <property name="show_response_actions">False</property>
+ </object>
+ </child>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]