[cheese/three-point-oh] Remove extra padding around scales



commit 004dff97b4f6a92836c326b3bcd65d10658066dc
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date:   Thu Jul 15 23:13:36 2010 +0530

    Remove extra padding around scales
    
    Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=624443

 data/cheese-prefs.ui        |   12 ------------
 src/cheese-preferences.vala |   17 +++++++++++++++++
 2 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/data/cheese-prefs.ui b/data/cheese-prefs.ui
index 7af051a..e4e1bfe 100644
--- a/data/cheese-prefs.ui
+++ b/data/cheese-prefs.ui
@@ -281,9 +281,6 @@
                             <property name="can_focus">True</property>
                             <property name="draw_value">False</property>
                             <property name="adjustment">brightness_adjustment</property>
-                            <marks>
-                              <mark value="0" />
-                            </marks>                                
                           </object>
                           <packing>
                             <property name="expand">True</property>
@@ -297,9 +294,6 @@
                             <property name="can_focus">True</property>
                             <property name="draw_value">False</property>
                             <property name="adjustment">contrast_adjustment</property>
-                            <marks>
-                              <mark value="1" />
-                            </marks>                                
                           </object>
                           <packing>
                             <property name="position">1</property>
@@ -311,9 +305,6 @@
                             <property name="can_focus">True</property>
                             <property name="draw_value">False</property>
                             <property name="adjustment">saturation_adjustment</property>
-                            <marks>
-                              <mark value="1" />
-                            </marks>                                
                           </object>
                           <packing>
                             <property name="position">2</property>
@@ -325,9 +316,6 @@
                             <property name="can_focus">True</property>
                             <property name="draw_value">False</property>
                             <property name="adjustment">hue_adjustment</property>
-                            <marks>
-                              <mark value="0" />
-                            </marks>                                
                           </object>
                           <packing>
                             <property name="position">3</property>
diff --git a/src/cheese-preferences.vala b/src/cheese-preferences.vala
index 1057f90..711ce4b 100644
--- a/src/cheese-preferences.vala
+++ b/src/cheese-preferences.vala
@@ -15,6 +15,11 @@ internal class Cheese.PreferencesDialog : GLib.Object
   private Gtk.Adjustment hue_adjustment;
   private Gtk.Adjustment saturation_adjustment;
 
+  private Gtk.Scale brightness_scale;
+  private Gtk.Scale contrast_scale;
+  private Gtk.Scale hue_scale;
+  private Gtk.Scale saturation_scale;
+
   private Gtk.SpinButton burst_repeat_spin;
   private Gtk.SpinButton burst_delay_spin;
 
@@ -34,6 +39,18 @@ internal class Cheese.PreferencesDialog : GLib.Object
     this.hue_adjustment        = (Gtk.Adjustment)builder.get_object ("hue_adjustment");
     this.saturation_adjustment = (Gtk.Adjustment)builder.get_object ("saturation_adjustment");
 
+    /* Here instead of in cheese-prefs.ui because of https://bugzilla.gnome.org/show_bug.cgi?id=624443 */
+
+    this.brightness_scale = (Gtk.Scale)builder.get_object ("brightness_scale");
+    this.contrast_scale   = (Gtk.Scale)builder.get_object ("contrast_scale");
+    this.hue_scale        = (Gtk.Scale)builder.get_object ("hue_scale");
+    this.saturation_scale = (Gtk.Scale)builder.get_object ("saturation_scale");
+
+    this.brightness_scale.add_mark (0, Gtk.PositionType.BOTTOM, null);
+    this.contrast_scale.add_mark (1, Gtk.PositionType.BOTTOM, null);
+    this.hue_scale.add_mark (0, Gtk.PositionType.BOTTOM, null);
+    this.saturation_scale.add_mark (1, Gtk.PositionType.BOTTOM, null);
+
     this.resolution_combo = (Gtk.ComboBox)builder.get_object ("resolution_combo_box");
     this.source_combo     = (Gtk.ComboBox)builder.get_object ("camera_combo_box");
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]