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:
@@ -2190,6 +2190,7 @@ update_feature_example (GtkFontChooserWidget *fontchooser,
|
|||||||
|
|
||||||
gtk_label_set_text (GTK_LABEL (item->example), text);
|
gtk_label_set_text (GTK_LABEL (item->example), text);
|
||||||
gtk_label_set_attributes (GTK_LABEL (item->example), attrs);
|
gtk_label_set_attributes (GTK_LABEL (item->example), attrs);
|
||||||
|
gtk_label_set_ellipsize (GTK_LABEL (item->example), PANGO_ELLIPSIZE_END);
|
||||||
|
|
||||||
g_free (text);
|
g_free (text);
|
||||||
pango_attr_list_unref (attrs);
|
pango_attr_list_unref (attrs);
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
<interface domain="gtk40">
|
<interface domain="gtk40">
|
||||||
<template class="GtkFontChooserDialog" parent="GtkDialog">
|
<template class="GtkFontChooserDialog" parent="GtkDialog">
|
||||||
<property name="title" translatable="yes">Select Font</property>
|
<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>
|
<style>
|
||||||
<class name="fontchooser"/>
|
<class name="fontchooser"/>
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -144,8 +144,6 @@
|
|||||||
<property name="column-spacing">6</property>
|
<property name="column-spacing">6</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkScrolledWindow">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="width-request">400</property>
|
|
||||||
<property name="height-request">300</property>
|
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<property name="vexpand">1</property>
|
<property name="vexpand">1</property>
|
||||||
<property name="hscrollbar-policy">2</property>
|
<property name="hscrollbar-policy">2</property>
|
||||||
|
|||||||
Reference in New Issue
Block a user