예제 #1
0
        public static double GetSliderPosition(this Gtk.Scale scale)
        {
            int start, end;

            scale.GetSliderRange(out start, out end);
            return(start + ((end - start) / 2));
        }
예제 #2
0
파일: TiltEditor.cs 프로젝트: GNOME/f-spot
 public override Widget ConfigurationWidget()
 {
     scale = new HScale (-45, 45, 1);
     scale.Value = 0.0;
     scale.ValueChanged += HandleValueChanged;
     return scale;
 }
예제 #3
0
 public Indicator(Method method, double offscalelow, double offscalehigh, Gtk.Label label, Gtk.VScale scale)
 {
     this.label = label;
     this.scale = scale;
     this.method = method;
     this.offscalehigh = offscalehigh;
     this.offscalelow = offscalelow;
 }
예제 #4
0
		protected override Widget CreateControls ()
		{
			VBox box = new VBox ();
			box.Spacing = 12;
			box.BorderWidth = 12;
			scale = new HScale (-45, 45, 1);
			scale.Value = 0.0;
			scale.ValueChanged += HandleValueChanged;
			scale.WidthRequest = 250;
			box.PackStart (scale);
			HBox actions = new HBox ();
			actions.Spacing = 12;
			Button cancel = new Button ("Cancel");
			cancel.Clicked += HandleCancel;
			actions.PackStart (cancel);
			Button apply = new Button ("Apply");
			apply.Clicked += HandleApply;
			actions.PackStart (apply);
			box.PackStart (actions);
			return box;
		}
예제 #5
0
        public EqualizerBandScale(uint band, int median, int min, int max, string labelText)
        {
            this.band = band;

            label = new Label ();
            label.Markup = String.Format ("<small>{0}</small>", GLib.Markup.EscapeText (labelText));
            label.Xalign = 0.0f;
            label.Yalign = 1.0f;
            label.Angle = 90.0;

            // new Adjustment (value, lower, upper, step_incr, page_incr, page_size);
            scale = new VScale (new Adjustment (median, min, max, max / 10, max / 10, 1));
            scale.DrawValue = false;
            scale.Inverted = true;
            scale.ValueChanged += OnValueChanged;

            scale.Show ();
            label.Show ();

            PackStart (scale, false, false, 0);
            PackStart (label, false, false, 0);
        }
예제 #6
0
 public override void Initialize()
 {
     Widget = (Gtk.Scale) CreateWidget ();
     Widget.DrawValue = false;
     Widget.Show ();
 }
예제 #7
0
		protected override Widget CreateControls ()
		{
			scale = new HScale (0, 1, 0.01);
			scale.ValueChanged += HandleValueChanged;
			scale.WidthRequest = 250;

			return scale;
		}