client: Use natural width intead of CSS min-width

#1516
This commit is contained in:
Cédric Bellegarde 2023-07-11 22:26:43 +02:00
parent 5ee6cc19ec
commit 186b5a6d7b
5 changed files with 15 additions and 13 deletions

View file

@ -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. * Updates the display of the received time on each list row.
* *

View file

@ -151,6 +151,11 @@ public class ConversationViewer : Gtk.Stack, Geary.BaseInterface {
base_unref(); 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. * Puts the view into composer mode, showing a full-height composer.
*/ */

View file

@ -48,6 +48,11 @@ public class FolderList.Tree : Sidebar.Tree, Geary.BaseInterface {
base_unref(); 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) { public void set_has_new(Geary.Folder folder, bool has_new) {
FolderEntry? entry = get_folder_entry(folder); FolderEntry? entry = get_folder_entry(folder);
if (entry != null) { if (entry != null) {

View file

@ -3,7 +3,6 @@
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<template class="ConversationListView" parent="GtkScrolledWindow"> <template class="ConversationListView" parent="GtkScrolledWindow">
<property name="width-request">250</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>

View file

@ -8,22 +8,10 @@
/* MainWindow */ /* MainWindow */
.geary-folder {
min-width: 300px;
}
geary-conversation-list revealer { geary-conversation-list revealer {
margin: 6px; margin: 6px;
} }
geary-conversation-list {
min-width: 360px;
}
geary-conversation-viewer {
min-width: 360px;
}
.geary-overlay { .geary-overlay {
background-color: @theme_base_color; background-color: @theme_base_color;
padding: 2px 6px; padding: 2px 6px;