OSDN Git Service

LinGui: fix a problem with subtitle controls and large fonts
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 2 Jul 2009 23:54:56 +0000 (23:54 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 2 Jul 2009 23:54:56 +0000 (23:54 +0000)
the controls would get the bottoms clipped if you used a large font

git-svn-id: svn://localhost/HandBrake/trunk@2658 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/ghb.ui
gtk/src/main.c

index 1376541..a9a9c32 100644 (file)
@@ -2253,8 +2253,7 @@ audio-volume-medium</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkTable" id="table5">
-                                <property name="height_request">45</property>
+                              <object class="GtkTable" id="subtitle_table">
                                 <property name="visible">True</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="n_rows">2</property>
index a3ec1f0..c089a76 100644 (file)
@@ -822,6 +822,21 @@ main (int argc, char *argv[])
        gtk_status_icon_set_tooltip(si, "HandBrake");
 #endif
 
+       // Ugly hack to keep subtitle table from bouncing around as I change
+       // which set of controls are visible
+       GtkRequisition req;
+       GtkWidget *widget;
+       gint height;
+       
+       widget = GHB_WIDGET(ud->builder, "SrtCodeset");
+       gtk_widget_size_request( widget, &req );
+       height = req.height;
+       widget = GHB_WIDGET(ud->builder, "srt_code_label");
+       gtk_widget_size_request( widget, &req );
+       height += req.height;
+       widget = GHB_WIDGET(ud->builder, "subtitle_table");
+       gtk_widget_set_size_request(widget, -1, height);
+       
        // Everything should be go-to-go.  Lets rock!
 
        gtk_main ();