From 186b5a6d7ba0be788688bc2f19b50be013bb8b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bellegarde?= Date: Tue, 11 Jul 2023 22:26:43 +0200 Subject: [PATCH] client: Use natural width intead of CSS min-width #1516 --- .../conversation-list/conversation-list-view.vala | 5 +++++ .../conversation-viewer/conversation-viewer.vala | 5 +++++ src/client/folder-list/folder-list-tree.vala | 5 +++++ ui/conversation-list-view.ui | 1 - ui/geary.css | 12 ------------ 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/client/conversation-list/conversation-list-view.vala b/src/client/conversation-list/conversation-list-view.vala index f1e0cab1..c6e4f24f 100644 --- a/src/client/conversation-list/conversation-list-view.vala +++ b/src/client/conversation-list/conversation-list-view.vala @@ -105,6 +105,11 @@ public class ConversationList.View : Gtk.ScrolledWindow, Geary.BaseInterface { } } + public override void get_preferred_width(out int minimum_size, out int natural_size) { + minimum_size = 300; + natural_size = 500; + } + /** * Updates the display of the received time on each list row. * diff --git a/src/client/conversation-viewer/conversation-viewer.vala b/src/client/conversation-viewer/conversation-viewer.vala index 92cf113f..013ff4b3 100644 --- a/src/client/conversation-viewer/conversation-viewer.vala +++ b/src/client/conversation-viewer/conversation-viewer.vala @@ -151,6 +151,11 @@ public class ConversationViewer : Gtk.Stack, Geary.BaseInterface { base_unref(); } + public override void get_preferred_width(out int minimum_size, out int natural_size) { + minimum_size = 300; + natural_size = 700; + } + /** * Puts the view into composer mode, showing a full-height composer. */ diff --git a/src/client/folder-list/folder-list-tree.vala b/src/client/folder-list/folder-list-tree.vala index f820d12f..1ecc97ca 100644 --- a/src/client/folder-list/folder-list-tree.vala +++ b/src/client/folder-list/folder-list-tree.vala @@ -48,6 +48,11 @@ public class FolderList.Tree : Sidebar.Tree, Geary.BaseInterface { base_unref(); } + public override void get_preferred_width(out int minimum_size, out int natural_size) { + minimum_size = 300; + natural_size = 500; + } + public void set_has_new(Geary.Folder folder, bool has_new) { FolderEntry? entry = get_folder_entry(folder); if (entry != null) { diff --git a/ui/conversation-list-view.ui b/ui/conversation-list-view.ui index 59a7ba50..0f063b38 100644 --- a/ui/conversation-list-view.ui +++ b/ui/conversation-list-view.ui @@ -3,7 +3,6 @@