mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-04 12:14:45 +13:00
Use IsDragging that way people can drag scroll bar
This commit is contained in:
parent
548505f833
commit
98f26fa25a
1 changed files with 6 additions and 3 deletions
|
@ -57,6 +57,11 @@ public void Update()
|
||||||
|
|
||||||
if (Visible)
|
if (Visible)
|
||||||
{
|
{
|
||||||
|
if (IsDragging)
|
||||||
|
{
|
||||||
|
Scroll(form.ShapeManager.InputManager.ClientMousePosition);
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle imageRectangleVisible = form.CanvasRectangle;
|
Rectangle imageRectangleVisible = form.CanvasRectangle;
|
||||||
imageRectangleVisible.Intersect(form.ClientArea);
|
imageRectangleVisible.Intersect(form.ClientArea);
|
||||||
|
|
||||||
|
@ -157,10 +162,8 @@ public override void OnDraw(Graphics g)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnMouseDown(Point position)
|
public void Scroll(Point position)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(position);
|
|
||||||
|
|
||||||
int inMousePosition, inClientAreaSize, inImageSize;
|
int inMousePosition, inClientAreaSize, inImageSize;
|
||||||
|
|
||||||
if (Orientation == Orientation.Horizontal)
|
if (Orientation == Orientation.Horizontal)
|
||||||
|
|
Loading…
Reference in a new issue