fontchooser: Make it more shrinkable

There were several places where unnecessarily big minimum sizes
were hardcoded. Instead, set a reasonable default size for the
dialog and the let window shrink further.

Helps for mobile situations.

Related: #7133
This commit is contained in:
Matthias Clasen
2024-11-03 20:57:13 -05:00
parent 08eab87c42
commit 2ad2bae1ca
3 changed files with 3 additions and 2 deletions

View File

@@ -2190,6 +2190,7 @@ update_feature_example (GtkFontChooserWidget *fontchooser,
gtk_label_set_text (GTK_LABEL (item->example), text);
gtk_label_set_attributes (GTK_LABEL (item->example), attrs);
gtk_label_set_ellipsize (GTK_LABEL (item->example), PANGO_ELLIPSIZE_END);
g_free (text);
pango_attr_list_unref (attrs);

View File

@@ -2,6 +2,8 @@
<interface domain="gtk40">
<template class="GtkFontChooserDialog" parent="GtkDialog">
<property name="title" translatable="yes">Select Font</property>
<property name="default-width" translatable="yes">400</property>
<property name="default-height" translatable="yes">500</property>
<style>
<class name="fontchooser"/>
</style>

View File

@@ -144,8 +144,6 @@
<property name="column-spacing">6</property>
<child>
<object class="GtkScrolledWindow">
<property name="width-request">400</property>
<property name="height-request">300</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="hscrollbar-policy">2</property>