Added TrackColor and ThumbColor

This commit is contained in:
Jaex 2018-04-04 04:26:06 +03:00
parent a991401253
commit 935492e008

View file

@ -34,10 +34,12 @@ namespace ShareX.ScreenCaptureLib
internal class ImageEditorScrollbar : DrawableObject
{
public Orientation Orientation { get; set; }
public int Thickness { get; set; } = 15;
public int Margin { get; set; } = 0;
public int Padding { get; set; } = 1;
public bool IsCapsule { get; set; } = false;
public int Thickness { get; set; } = 15; //10;
public int Margin { get; set; } = 0; //15;
public int Padding { get; set; } = 1; //2;
public bool IsCapsule { get; set; } = false; //true;
public Color TrackColor { get; set; } = Color.FromArgb(255, 0, 0); //60, 60, 60);
public Color ThumbColor { get; set; } = Color.FromArgb(255, 255, 255); //130, 130, 130);
public float Opacity { get; private set; }
public Rectangle ThumbRectangle { get; private set; }
@ -136,8 +138,8 @@ public override void OnDraw(Graphics g)
{
if (Visible)
{
using (Brush trackBrush = new SolidBrush(Color.FromArgb((int)(255 * Opacity), 60, 60, 60)))
using (Brush thumbBrush = new SolidBrush(Color.FromArgb((int)(255 * Opacity), 130, 130, 130)))
using (Brush trackBrush = new SolidBrush(Color.FromArgb((int)(255 * Opacity), TrackColor)))
using (Brush thumbBrush = new SolidBrush(Color.FromArgb((int)(255 * Opacity), ThumbColor)))
{
if (IsCapsule)
{