gjdwebserver-overlay/mail-client/geary/files/0050-application-main-window-Sync-the-pane-size-request.patch

83 lines
3.3 KiB
Diff
Raw Normal View History

2021-03-23 14:05:24 +01:00
From edfb1a2cf371ab743cbf804cbc4d34b7e4cfb8c6 Mon Sep 17 00:00:00 2001
From: Adrien Plazas <kekun.plazas@laposte.net>
Date: Thu, 16 Jan 2020 13:52:03 +0100
Subject: [PATCH 050/124] application-main-window: Sync the pane size request
Bind each pane's elements minimum size requests via size groups.
---
.../application/application-main-window.vala | 17 +++++++++++++++
ui/application-main-window.ui | 21 +++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/src/client/application/application-main-window.vala b/src/client/application/application-main-window.vala
index 43289e33..4c6d1038 100644
--- a/src/client/application/application-main-window.vala
+++ b/src/client/application/application-main-window.vala
@@ -328,6 +328,17 @@ public class Application.MainWindow :
private Gtk.Box conversation_list_box;
[GtkChild]
private Gtk.ScrolledWindow conversation_list_scrolled;
+ [GtkChild]
+ private Gtk.SizeGroup folder_size_group;
+ [GtkChild]
+ private Gtk.SizeGroup folder_separator_size_group;
+ [GtkChild]
+ private Gtk.SizeGroup conversations_size_group;
+ [GtkChild]
+ private Gtk.SizeGroup conversations_separator_size_group;
+ [GtkChild]
+ private Gtk.SizeGroup conversation_size_group;
+
[GtkChild]
private Gtk.Overlay overlay;
@@ -1239,9 +1250,15 @@ public class Application.MainWindow :
);
this.conversations_paned.pack2(this.conversation_viewer, true, false);
+ this.conversation_size_group.add_widget(this.conversation_viewer);
// Main toolbar
this.main_toolbar = new MainToolbar(config);
+ this.main_toolbar.add_to_size_groups(this.folder_size_group,
+ this.folder_separator_size_group,
+ this.conversations_size_group,
+ this.conversations_separator_size_group,
+ this.conversation_size_group);
this.main_toolbar.move_folder_menu.folder_selected.connect(on_move_conversation);
this.main_toolbar.copy_folder_menu.folder_selected.connect(on_copy_conversation);
this.main_toolbar.bind_property("search-open", this.search_bar, "search-mode-enabled",
diff --git a/ui/application-main-window.ui b/ui/application-main-window.ui
index 4a948294..872f31bd 100644
--- a/ui/application-main-window.ui
+++ b/ui/application-main-window.ui
@@ -138,4 +138,25 @@
<class name="geary-main-window"/>
</style>
</template>
+ <object class="GtkSizeGroup" id="folder_size_group">
+ <property name="mode">horizontal</property>
+ <widgets>
+ <widget name="folder_box"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup" id="folder_separator_size_group">
+ <property name="mode">horizontal</property>
+ </object>
+ <object class="GtkSizeGroup" id="conversations_size_group">
+ <property name="mode">horizontal</property>
+ <widgets>
+ <widget name="conversation_list_box"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup" id="conversations_separator_size_group">
+ <property name="mode">horizontal</property>
+ </object>
+ <object class="GtkSizeGroup" id="conversation_size_group">
+ <property name="mode">horizontal</property>
+ </object>
</interface>
--
2.29.2