aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Slider.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-11-13 14:48:41 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-11-13 14:48:41 +0100
commite6541b353e7a0ecfd2e514e5c9c6f6c9c1ba96b1 (patch)
tree8f3e5ecd92e3a6b5a328e514d6c14fa703bba9e6 /src/GraphicObjects/Slider.cs
parent65820f61457262b631eba35283c55135aecbc5f2 (diff)
first try with xlib
Diffstat (limited to 'src/GraphicObjects/Slider.cs')
-rw-r--r--src/GraphicObjects/Slider.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/GraphicObjects/Slider.cs b/src/GraphicObjects/Slider.cs
index 2bdd5b8a..64668c48 100644
--- a/src/GraphicObjects/Slider.cs
+++ b/src/GraphicObjects/Slider.cs
@@ -68,7 +68,7 @@ namespace Crow
protected double unity;
#region Public properties
- [DefaultValue("vgradient|0:White|0,1:LightGray|0,9:LightGray|1:DimGray")]
+ [DefaultValue("vgradient|0:White|0,1:LightGrey|0,9:LightGrey|1:DimGrey")]
public virtual Fill CursorColor {
get { return _cursorColor; }
set {
@@ -121,6 +121,7 @@ namespace Crow
protected override void onDraw (Context gr)
{
base.onDraw (gr);
+
if (Maximum <= 0)
return;
@@ -141,6 +142,10 @@ namespace Crow
pEnd.X += 0.5;
}
+
+ Background.SetAsSource (gr,r);
+ gr.Rectangle (r);
+ gr.Fill ();
DrawGraduations (gr, pStart,pEnd);
@@ -184,7 +189,7 @@ namespace Crow
cursor.TopLeft = new Point ((int)(p1.X - r.Width / 2),
r.Top + (int)((Value - Minimum) * unity));
}
- cursor.Inflate (-1);
+ //cursor.Inflate (-1);
}
Point mouseDownInit;
double mouseDownInitValue;