summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-02-19 16:05:39 -0700
committerJohn Stebbins <[email protected]>2019-02-19 16:07:35 -0700
commita34220c7d2a99bad2330098b2426645df037136b (patch)
tree5b26d4876d5fdaeb1e651fed2d9356db0cb75c1e
parentc99462789138159261c4d8a09cb8bb90d119aace (diff)
LinGui: adjust the size of subtitle widgets
Make language text smaller. Some of the native characters are quite tall and result in an overly tall widget. Fixes https://github.com/HandBrake/HandBrake/issues/1869
-rw-r--r--gtk/src/ghb.m46
-rw-r--r--gtk/src/hb-backend.c7
2 files changed, 8 insertions, 5 deletions
diff --git a/gtk/src/ghb.m4 b/gtk/src/ghb.m4
index 108a89aef..a9cb6ea8b 100644
--- a/gtk/src/ghb.m4
+++ b/gtk/src/ghb.m4
@@ -8345,7 +8345,7 @@ This value will be used by players in subtitle menus.</property>
</child>
<child>
<object class="GtkComboBox" id="SrtCodeset">
- <property name="valign">GTK_ALIGN_CENTER</property>
+ <property name="valign">GTK_ALIGN_FILL</property>
<property name="width_request">150</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -8355,8 +8355,8 @@ This value will be used by players in subtitle menus.</property>
SRTs come in all flavours of character sets.
We translate the character set to UTF-8.
The source's character code is needed in order to perform this translation.</property>
- <property name="has_entry">True</property>
<signal name="changed" handler="srt_codeset_changed_cb" swapped="no"/>
+ <property name="has_entry">True</property>
<child internal-child="entry">
<object class="GtkEntry" id="combobox-entry1">
<property name="can_focus">True</property>
@@ -8389,6 +8389,8 @@ The source's character code is needed in order to perform this translation.</pro
</child>
<child>
<object class="GtkSpinButton" id="ImportOffset">
+ <property name="valign">GTK_ALIGN_FILL</property>
+ <property name="vexpand">False</property>
<property name="width-chars">8</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index a638487f6..b80bed556 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1980,12 +1980,12 @@ language_opts_set(signal_user_data_t *ud, const gchar *name,
for (iso639 = lang_get_next(NULL), ii = 0; iso639 != NULL;
iso639 = lang_get_next(iso639), ii++)
{
- const gchar *lang;
+ gchar *lang;
if (iso639->native_name[0] != 0)
- lang = iso639->native_name;
+ lang = g_strdup_printf("<small>%s</small>", iso639->native_name);
else
- lang = iso639->eng_name;
+ lang = g_strdup_printf("<small>%s</small>", iso639->eng_name);
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter,
@@ -1994,6 +1994,7 @@ language_opts_set(signal_user_data_t *ud, const gchar *name,
2, iso639->iso639_2,
3, (gdouble)ii,
-1);
+ g_free(lang);
}
g_signal_connect(combo, "key-press-event", combo_search_key_press_cb, ud);
}