diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-24 12:46:43 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-24 12:46:43 +0100 |
| commit | d8acaa909ce73e150827db9846cd8690fb93d68e (patch) | |
| tree | c22aab77a5851aad79505a49dc6ac91ca4b0a106 /src/GraphicObjects/SaturationValueSelector.cs | |
| parent | e39ac936765e88382d858ee6922293315a18b60d (diff) | |
| parent | 1a4fe8bd37ed4a3e3324a134df4f90c14b315918 (diff) | |
Merge branch 'master' into CrowIDE
Diffstat (limited to 'src/GraphicObjects/SaturationValueSelector.cs')
| -rw-r--r-- | src/GraphicObjects/SaturationValueSelector.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/GraphicObjects/SaturationValueSelector.cs b/src/GraphicObjects/SaturationValueSelector.cs index b71fa7ef..a1ddc5b4 100644 --- a/src/GraphicObjects/SaturationValueSelector.cs +++ b/src/GraphicObjects/SaturationValueSelector.cs @@ -42,7 +42,7 @@ namespace Crow NotifyValueChanged ("V", v); mousePos.Y = (int)Math.Floor((1.0-v) * (double)ClientRectangle.Height); - CurrentInterface.EnqueueForRepaint (this); + RegisterForRedraw (); } } [XmlAttributeAttribute()] @@ -54,7 +54,8 @@ namespace Crow s = value; NotifyValueChanged ("S", s); mousePos.X = (int)Math.Floor(s * (double)ClientRectangle.Width); - CurrentInterface.EnqueueForRepaint (this); + + RegisterForRedraw (); } } protected override void onDraw (Cairo.Context gr) @@ -62,8 +63,6 @@ namespace Crow base.onDraw (gr); Rectangle r = ClientRectangle; - Rectangle rGrad = r; - rGrad.Inflate (-1); if (Foreground != null) {//TODO:test if null should be removed Foreground.SetAsSource (gr, r); @@ -74,13 +73,13 @@ namespace Crow Crow.Gradient grad = new Gradient (Gradient.Type.Horizontal); grad.Stops.Add (new Gradient.ColorStop (0, new Color (1, 1, 1, 1))); grad.Stops.Add (new Gradient.ColorStop (1, new Color (1, 1, 1, 0))); - grad.SetAsSource (gr, rGrad); + grad.SetAsSource (gr, r); CairoHelpers.CairoRectangle (gr, r, CornerRadius); gr.Fill(); grad = new Gradient (Gradient.Type.Vertical); grad.Stops.Add (new Gradient.ColorStop (0, new Color (0, 0, 0, 0))); grad.Stops.Add (new Gradient.ColorStop (1, new Color (0, 0, 0, 1))); - grad.SetAsSource (gr, rGrad); + grad.SetAsSource (gr, r); CairoHelpers.CairoRectangle (gr, r, CornerRadius); gr.Fill(); } @@ -95,7 +94,7 @@ namespace Crow ctx.Translate (rb.X, rb.Y); ctx.SetSourceColor (Color.White); - ctx.Arc (mousePos.X, mousePos.Y, 3.0, 0, Math.PI * 2.0); + ctx.Arc (mousePos.X, mousePos.Y, 3.5, 0, Math.PI * 2.0); ctx.LineWidth = 1.0; ctx.Stroke (); @@ -111,6 +110,8 @@ namespace Crow v = 1.0 - (double)mousePos.Y / (double)cb.Height; NotifyValueChanged ("S", s); NotifyValueChanged ("V", v); + + RegisterForRedraw (); } public override void OnLayoutChanges (LayoutingType layoutType) { |