[gnome-text-editor] languagedialog: resize window with results
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] languagedialog: resize window with results
- Date: Wed, 1 Dec 2021 17:50:14 +0000 (UTC)
commit b09e147647fbad921ebb7dc3b79e3348000916c9
Author: Christian Hergert <chergert redhat com>
Date: Wed Dec 1 09:50:08 2021 -0800
languagedialog: resize window with results
This makes the window no longer resizable by the user but in exchange we
can resize it based on results so that the list looks better.
Fixes #236
src/editor-language-dialog.c | 3 ++-
src/editor-language-dialog.ui | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/editor-language-dialog.c b/src/editor-language-dialog.c
index 7928d72..ee595fd 100644
--- a/src/editor-language-dialog.c
+++ b/src/editor-language-dialog.c
@@ -293,7 +293,8 @@ editor_language_dialog_init (EditorLanguageDialog *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
- gtk_window_set_default_size (GTK_WINDOW (self), 500, 500);
+ gtk_window_set_default_size (GTK_WINDOW (self), 500, -1);
+ gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
g_signal_connect_object (self->list_box,
"row-activated",
diff --git a/src/editor-language-dialog.ui b/src/editor-language-dialog.ui
index 86dfa65..55b9655 100644
--- a/src/editor-language-dialog.ui
+++ b/src/editor-language-dialog.ui
@@ -31,12 +31,14 @@
<child>
<object class="GtkScrolledWindow">
<property name="vexpand">true</property>
+ <property name="max-content-height">400</property>
+ <property name="propagate-natural-height">true</property>
<property name="hscrollbar-policy">never</property>
<child>
<object class="AdwClamp">
<property name="margin-start">42</property>
<property name="margin-end">42</property>
- <property name="margin-top">12</property>
+ <property name="margin-top">42</property>
<property name="margin-bottom">42</property>
<property name="child">
<object class="GtkListBox" id="list_box">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]