[shotwell] Dedeprecate Adjust Tool



commit ebfb5620ef054276b84eb0a5aaf87bc2c26dd9fd
Author: Jens Georg <mail jensge org>
Date:   Tue Nov 15 23:47:55 2016 +0100

    Dedeprecate Adjust Tool
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/editing_tools/EditingTools.vala |   48 ++++++++++++++++++++--------------
 1 files changed, 28 insertions(+), 20 deletions(-)
---
diff --git a/src/editing_tools/EditingTools.vala b/src/editing_tools/EditingTools.vala
index a6e7be7..d8a2057 100644
--- a/src/editing_tools/EditingTools.vala
+++ b/src/editing_tools/EditingTools.vala
@@ -2212,7 +2212,7 @@ public class AdjustTool : EditingTool {
         public Gtk.Scale exposure_slider = new Gtk.Scale.with_range(Gtk.Orientation.HORIZONTAL,
             ExposureTransformation.MIN_PARAMETER, ExposureTransformation.MAX_PARAMETER,
             1.0);
-        public Gtk.HScale contrast_slider = new Gtk.HScale.with_range(
+        public Gtk.Scale contrast_slider = new Gtk.Scale.with_range(Gtk.Orientation.HORIZONTAL,
             ContrastTransformation.MIN_PARAMETER, ContrastTransformation.MAX_PARAMETER,
             1.0);
         public Gtk.Scale saturation_slider = new Gtk.Scale.with_range(Gtk.Orientation.HORIZONTAL,
@@ -2244,60 +2244,67 @@ public class AdjustTool : EditingTool {
             slider_organizer.set_column_homogeneous(false);
             slider_organizer.set_row_spacing(12);
             slider_organizer.set_column_spacing(12);
-            slider_organizer.set_margin_left(12);
+            slider_organizer.set_margin_start(12);
             slider_organizer.set_margin_bottom(12);
 
             Gtk.Label exposure_label = new Gtk.Label.with_mnemonic(_("Exposure:"));
-            exposure_label.set_alignment(0.0f, 0.5f);
+            exposure_label.halign = Gtk.Align.START;
+            exposure_label.valign = Gtk.Align.CENTER;
             slider_organizer.attach(exposure_label, 0, 0, 1, 1);
             slider_organizer.attach(exposure_slider, 1, 0, 1, 1);
             exposure_slider.set_size_request(SLIDER_WIDTH, -1);
             exposure_slider.set_draw_value(false);
-            exposure_slider.set_margin_right(0);
+            exposure_slider.set_margin_end(0);
 
             Gtk.Label contrast_label = new Gtk.Label.with_mnemonic(_("Contrast:"));
-            contrast_label.set_alignment(0.0f, 0.5f);
+            contrast_label.halign = Gtk.Align.START;
+            contrast_label.valign = Gtk.Align.CENTER;
             slider_organizer.attach(contrast_label, 0, 1, 1, 1);
             slider_organizer.attach(contrast_slider, 1, 1, 1, 1);
             contrast_slider.set_size_request(SLIDER_WIDTH, -1);
             contrast_slider.set_draw_value(false);
-            contrast_slider.set_margin_right(0);
+            contrast_slider.set_margin_end(0);
 
             Gtk.Label saturation_label = new Gtk.Label.with_mnemonic(_("Saturation:"));
-            saturation_label.set_alignment(0.0f, 0.5f);
+            saturation_label.halign = Gtk.Align.START;
+            saturation_label.valign = Gtk.Align.CENTER;
             slider_organizer.attach(saturation_label, 0, 2, 1, 1);
             slider_organizer.attach(saturation_slider, 1, 2, 1, 1);
             saturation_slider.set_size_request(SLIDER_WIDTH, -1);
             saturation_slider.set_draw_value(false);
-            saturation_slider.set_margin_right(0);
+            saturation_slider.set_margin_end(0);
 
             Gtk.Label tint_label = new Gtk.Label.with_mnemonic(_("Tint:"));
-            tint_label.set_alignment(0.0f, 0.5f);
+            tint_label.halign = Gtk.Align.START;
+            tint_label.valign = Gtk.Align.CENTER;
             slider_organizer.attach(tint_label, 0, 3, 1, 1);
             slider_organizer.attach(tint_slider, 1, 3, 1, 1);
             tint_slider.set_size_request(SLIDER_WIDTH, -1);
             tint_slider.set_draw_value(false);
-            tint_slider.set_margin_right(0);
+            tint_slider.set_margin_end(0);
 
             Gtk.Label temperature_label =
                 new Gtk.Label.with_mnemonic(_("Temperature:"));
-            temperature_label.set_alignment(0.0f, 0.5f);
+            temperature_label.halign = Gtk.Align.START;
+            temperature_label.valign = Gtk.Align.CENTER;
             slider_organizer.attach(temperature_label, 0, 4, 1, 1);
             slider_organizer.attach(temperature_slider, 1, 4, 1, 1);
             temperature_slider.set_size_request(SLIDER_WIDTH, -1);
             temperature_slider.set_draw_value(false);
-            temperature_slider.set_margin_right(0);
+            temperature_slider.set_margin_end(0);
 
             Gtk.Label shadows_label = new Gtk.Label.with_mnemonic(_("Shadows:"));
-            shadows_label.set_alignment(0.0f, 0.5f);
+            shadows_label.halign = Gtk.Align.START;
+            shadows_label.valign = Gtk.Align.CENTER;
             slider_organizer.attach(shadows_label, 0, 5, 1, 1);
             slider_organizer.attach(shadows_slider, 1, 5, 1, 1);
             shadows_slider.set_size_request(SLIDER_WIDTH, -1);
             shadows_slider.set_draw_value(false);
-            shadows_slider.set_margin_right(0);
+            shadows_slider.set_margin_end(0);
 
             Gtk.Label highlights_label = new Gtk.Label.with_mnemonic(_("Highlights:"));
-            highlights_label.set_alignment(0.0f, 0.5f);
+            highlights_label.halign = Gtk.Align.START;
+            highlights_label.valign = Gtk.Align.CENTER;
             slider_organizer.attach(highlights_label, 0, 6, 1, 1);
             slider_organizer.attach(highlights_slider, 1, 6, 1, 1);
             highlights_slider.set_size_request(SLIDER_WIDTH, -1);
@@ -2309,15 +2316,16 @@ public class AdjustTool : EditingTool {
             button_layouter.pack_start(reset_button, true, true, 1);
             button_layouter.pack_start(ok_button, true, true, 1);
 
-            Gtk.Alignment histogram_aligner = new Gtk.Alignment(0.0f, 0.0f, 0.0f, 0.0f);
-            histogram_aligner.add(histogram_manipulator);
-            histogram_aligner.set_padding(12, 8, 12, 12);
+            histogram_manipulator.set_margin_start (12);
+            histogram_manipulator.set_margin_end (12);
+            histogram_manipulator.set_margin_top (12);
+            histogram_manipulator.set_margin_bottom (8);
 
             Gtk.Box pane_layouter = new Gtk.Box(Gtk.Orientation.VERTICAL, 8);
-            pane_layouter.add(histogram_aligner);
+            pane_layouter.add(histogram_manipulator);
             pane_layouter.add(slider_organizer);
             pane_layouter.add(button_layouter);
-            pane_layouter.set_child_packing(histogram_aligner, true, true, 0, Gtk.PackType.START);
+            pane_layouter.set_child_packing(histogram_manipulator, true, true, 0, Gtk.PackType.START);
 
             add(pane_layouter);
         }


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