summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-03-06 20:24:27 +0000
committerjstebbins <[email protected]>2014-03-06 20:24:27 +0000
commite3fa2d7ebb17007c226dab89d26730f061e95b8d (patch)
tree6d53cfbe24b5bb6f9f6ce0982352a3dcdebbb648 /gtk
parent41dd0af9c6b059b05de8c8a98047437ffaac75e3 (diff)
LinGui: Improve widget layout
Add padding to GtkEntry. On some themes, it looked very crowded. Let height of x264 extra settings text box float with height of widgets that it shares a grid with. It's fixed height was causing weird layout. Reduce border around GtkComboBox. There are lots of combo boxes, so this results in a significant reduction in the overall size of the window. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6101 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/ghb.ui29
-rw-r--r--gtk/src/hb-backend.c44
-rw-r--r--gtk/src/main.c9
3 files changed, 58 insertions, 24 deletions
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 6a7cd5ec7..f1a0e3327 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -1076,6 +1076,7 @@ Here you can adjust cropping, resolution, aspect ratio, and filters.</property>
<child>
<object class="GtkComboBox" id="title">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="tooltip_text" translatable="yes">Set the title to encode.
@@ -1177,6 +1178,7 @@ This is often the feature title of a DVD.</property>
<child>
<object class="GtkComboBox" id="PtoPType">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Range of title to encode. Can be chapters, seconds, or frames.</property>
<signal name="changed" handler="ptop_widget_changed_cb" swapped="no"/>
@@ -1409,6 +1411,7 @@ This is often the feature title of a DVD.</property>
<child>
<object class="GtkComboBox" id="FileFormat">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Format to mux encoded tracks to.</property>
<signal name="changed" handler="container_changed_cb" swapped="no"/>
@@ -2139,6 +2142,7 @@ This allows a player to initiate playback before downloading the entire file.</p
<child>
<object class="GtkComboBox" id="VideoEncoder">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Available video encoders.</property>
<signal name="changed" handler="vcodec_changed_cb" swapped="no"/>
@@ -2168,6 +2172,7 @@ This allows a player to initiate playback before downloading the entire file.</p
<child>
<object class="GtkComboBox" id="VideoFramerate">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text" translatable="yes">Output framerate.
@@ -2463,7 +2468,7 @@ Use at your own risk!</property>
<signal name="toggled" handler="x264_use_advanced_options_changed_cb" swapped="no"/>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
@@ -2540,6 +2545,7 @@ settings will result in better quality or smaller files.</property>
<child>
<object class="GtkComboBox" id="x264Tune">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text" translatable="yes">Tune settings to optimize for common scenarios.
@@ -2620,6 +2626,7 @@ this setting is of little value here.</property>
<child>
<object class="GtkComboBox" id="h264Profile">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text" translatable="yes">Limit the H.264 profile of the output stream.
@@ -2652,6 +2659,7 @@ Overrides all other settings.</property>
<child>
<object class="GtkComboBox" id="h264Level">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text" translatable="yes">Sets and ensures compliance with the specified H.264 level.
@@ -2690,7 +2698,6 @@ Overrides all other settings.</property>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow8">
- <property name="height_request">60</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">etched-in</property>
@@ -2800,6 +2807,7 @@ Colon separated list of x264 options.</property>
<child>
<object class="GtkComboBox" id="AudioTrackSelectionBehavior">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<signal name="changed" handler="audio_def_widget_changed_cb" swapped="no"/>
</object>
@@ -3120,6 +3128,7 @@ This permits DTS-HD passthru to be selected when automatic passthru selection is
<child>
<object class="GtkComboBox" id="AudioEncoderFallback">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text" translatable="yes">Set the audio codec to encode with when a suitable track can not be found for audio passthru.</property>
@@ -3465,6 +3474,7 @@ This permits DTS-HD passthru to be selected when automatic passthru selection is
<child>
<object class="GtkComboBox" id="SubtitleTrackSelectionBehavior">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<signal name="changed" handler="subtitle_def_widget_changed_cb" swapped="no"/>
</object>
@@ -5886,6 +5896,7 @@ You can edit these and add additional options.</property>
<property name="spacing">4</property>
<child>
<object class="GtkComboBox" id="check_updates">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<signal name="changed" handler="pref_changed_cb" swapped="no"/>
@@ -5935,6 +5946,7 @@ You can edit these and add additional options.</property>
<child>
<object class="GtkComboBox" id="WhenComplete">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<signal name="changed" handler="pref_changed_cb" swapped="no"/>
</object>
@@ -6276,6 +6288,7 @@ You can edit these and add additional options.</property>
<property name="spacing">4</property>
<child>
<object class="GtkComboBox" id="VideoQualityGranularity">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="width_request">55</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -6359,6 +6372,7 @@ You can edit these and add additional options.</property>
<property name="spacing">4</property>
<child>
<object class="GtkComboBox" id="LoggingLevel">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="width_request">55</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -6405,6 +6419,7 @@ You can edit these and add additional options.</property>
<property name="spacing">4</property>
<child>
<object class="GtkComboBox" id="LogLongevity">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<signal name="changed" handler="pref_changed_cb" swapped="no"/>
@@ -8188,6 +8203,7 @@ This will be the resolution that most closely matches the source resolution afte
<child>
<object class="GtkComboBox" id="PicturePAR">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_markup">&lt;b&gt;Anamorphic Modes:&lt;/b&gt;
@@ -8236,6 +8252,7 @@ Strict - Keep original source dimensions and pixel
<child>
<object class="GtkComboBox" id="PictureModulus">
<property name="visible">True</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text" translatable="yes">Align storage dimensions to multiples of this value.
@@ -8652,6 +8669,7 @@ If your source exhibits 'blockiness', this filter may help clean it up.</propert
</child>
<child>
<object class="GtkComboBox" id="PictureDenoise">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -8747,6 +8765,7 @@ SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma</property>
</child>
<child>
<object class="GtkComboBox" id="PictureDetelecine">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -8847,6 +8866,7 @@ Frames that are not interlaced will suffer some quality degradation.</property>
</child>
<child>
<object class="GtkComboBox" id="PictureDecomb">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -8898,6 +8918,7 @@ ErosionThresh:NoiseThresh:MaxSearchDistance:PostProcessing:Parity</property>
</child>
<child>
<object class="GtkComboBox" id="PictureDeinterlace">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -9446,6 +9467,7 @@ YadifMode:YadifParity:McdintMode:McdeintQp</property>
</child>
<child>
<object class="GtkComboBox" id="SrtLanguage">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -9462,6 +9484,7 @@ YadifMode:YadifParity:McdintMode:McdeintQp</property>
</child>
<child>
<object class="GtkComboBox" id="SrtCodeset">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="width_request">150</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -9548,6 +9571,7 @@ YadifMode:YadifParity:McdintMode:McdeintQp</property>
</child>
<child>
<object class="GtkComboBox" id="SubtitleTrack">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -9734,6 +9758,7 @@ in your output.</property>
</child>
<child>
<object class="GtkComboBox" id="AudioTrack">
+ <property name="valign">GTK_ALIGN_CENTER</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index f6b7021d0..77282d2ee 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1883,33 +1883,39 @@ title_opts_set(GtkBuilder *builder, const gchar *name)
}
if( count <= 0 )
{
+ char *opt;
+
// No titles. Fill in a default.
gtk_list_store_append(store, &iter);
+ opt = g_strdup_printf("<small>%s</small>", _("No Titles"));
gtk_list_store_set(store, &iter,
- 0, _("No Titles"),
+ 0, opt,
1, TRUE,
2, "none",
3, -1.0,
4, "none",
-1);
+ g_free(opt);
return;
}
for (ii = 0; ii < count; ii++)
{
- char *title_opt, *title_index;
+ char *title_opt, *title_index, *opt;
title = hb_list_item(list, ii);
title_opt = ghb_create_title_label(title);
+ opt = g_strdup_printf("<small>%s</small>", title_opt);
title_index = g_strdup_printf("%d", title->index);
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter,
- 0, title_opt,
+ 0, opt,
1, TRUE,
2, title_index,
3, (gdouble)title->index,
4, title_index,
-1);
+ g_free(opt);
g_free(title_opt);
g_free(title_index);
}
@@ -2308,6 +2314,7 @@ ghb_find_subtitle_track(const hb_title_t * title, const gchar * lang, int start)
return -1;
}
+#if 0
static void
generic_opts_set(GtkBuilder *builder, const gchar *name, combo_opts_t *opts)
{
@@ -2332,6 +2339,7 @@ generic_opts_set(GtkBuilder *builder, const gchar *name, combo_opts_t *opts)
-1);
}
}
+#endif
static void
small_opts_set(GtkBuilder *builder, const gchar *name, combo_opts_t *opts)
@@ -2505,20 +2513,20 @@ ghb_update_ui_combo_box(
title_opts_set(ud->builder, "title");
audio_track_opts_set(ud->builder, "AudioTrack", user_data);
subtitle_track_opts_set(ud->builder, "SubtitleTrack", user_data);
- generic_opts_set(ud->builder, "VideoQualityGranularity", &vqual_granularity_opts);
- generic_opts_set(ud->builder, "SubtitleTrackSelectionBehavior", &subtitle_track_sel_opts);
- generic_opts_set(ud->builder, "AudioTrackSelectionBehavior", &audio_track_sel_opts);
- generic_opts_set(ud->builder, "PtoPType", &point_to_point_opts);
- generic_opts_set(ud->builder, "WhenComplete", &when_complete_opts);
- generic_opts_set(ud->builder, "PicturePAR", &par_opts);
- generic_opts_set(ud->builder, "PictureModulus", &alignment_opts);
- generic_opts_set(ud->builder, "LoggingLevel", &logging_opts);
- generic_opts_set(ud->builder, "LogLongevity", &log_longevity_opts);
- generic_opts_set(ud->builder, "check_updates", &appcast_update_opts);
- generic_opts_set(ud->builder, "PictureDeinterlace", &deint_opts);
- generic_opts_set(ud->builder, "PictureDetelecine", &detel_opts);
- generic_opts_set(ud->builder, "PictureDecomb", &decomb_opts);
- generic_opts_set(ud->builder, "PictureDenoise", &denoise_opts);
+ small_opts_set(ud->builder, "VideoQualityGranularity", &vqual_granularity_opts);
+ small_opts_set(ud->builder, "SubtitleTrackSelectionBehavior", &subtitle_track_sel_opts);
+ small_opts_set(ud->builder, "AudioTrackSelectionBehavior", &audio_track_sel_opts);
+ small_opts_set(ud->builder, "PtoPType", &point_to_point_opts);
+ small_opts_set(ud->builder, "WhenComplete", &when_complete_opts);
+ small_opts_set(ud->builder, "PicturePAR", &par_opts);
+ small_opts_set(ud->builder, "PictureModulus", &alignment_opts);
+ small_opts_set(ud->builder, "LoggingLevel", &logging_opts);
+ small_opts_set(ud->builder, "LogLongevity", &log_longevity_opts);
+ small_opts_set(ud->builder, "check_updates", &appcast_update_opts);
+ small_opts_set(ud->builder, "PictureDeinterlace", &deint_opts);
+ small_opts_set(ud->builder, "PictureDetelecine", &detel_opts);
+ small_opts_set(ud->builder, "PictureDecomb", &decomb_opts);
+ small_opts_set(ud->builder, "PictureDenoise", &denoise_opts);
small_opts_set(ud->builder, "x264_direct", &direct_opts);
small_opts_set(ud->builder, "x264_b_adapt", &badapt_opts);
small_opts_set(ud->builder, "x264_bpyramid", &bpyramid_opts);
@@ -2567,7 +2575,7 @@ ghb_update_ui_combo_box(
else if (strcmp(name, "FileFormat") == 0)
container_opts_set(ud->builder, "FileFormat");
else
- generic_opts_set(ud->builder, name, find_combo_table(name));
+ small_opts_set(ud->builder, name, find_combo_table(name));
}
if (handler_id > 0)
{
diff --git a/gtk/src/main.c b/gtk/src/main.c
index a4357c1fb..e07276d70 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -701,18 +701,19 @@ G_MODULE_EXPORT void preview_hud_size_alloc_cb(GtkWidget *widget, signal_user_da
const gchar *MyCSS =
" \n\
-GtkRadioButton .button { \n\
- border-width: 0px; \n\
+GtkRadioButton .button { \n\
+ border-width: 0px; \n\
padding: 0px; \n\
} \n\
GtkComboBox { \n\
padding: 0px; \n\
} \n\
-GtkComboBox .button { \n\
+GtkComboBox .button { \n\
padding: 2px; \n\
+ border-width: 0px; \n\
} \n\
GtkEntry { \n\
- padding: 0px 4px; \n\
+ padding: 4px 4px; \n\
} \n\
\n\
@define-color black #000000; \n\