mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Menu will open with right click instead of space bar now, space bar will do fullscreen ss instead, right click can still cancel region drawing
This commit is contained in:
parent
d5c21ebdf2
commit
b82ec96b95
3 changed files with 9 additions and 12 deletions
|
@ -461,6 +461,7 @@ protected virtual void WriteTips(StringBuilder sb)
|
|||
switch (AreaManager.CurrentShapeType)
|
||||
{
|
||||
case ShapeType.RegionRoundedRectangle:
|
||||
case ShapeType.DrawingRoundedRectangle:
|
||||
sb.AppendLine(Resources.RectangleRegion_WriteTips__Numpad___or____Change_rounded_rectangle_corner_radius);
|
||||
break;
|
||||
case ShapeType.RegionTriangle:
|
||||
|
|
|
@ -181,6 +181,9 @@ private void Surface_KeyUp(object sender, KeyEventArgs e)
|
|||
case Keys.Escape:
|
||||
Close(SurfaceResult.Close);
|
||||
break;
|
||||
case Keys.Space:
|
||||
Close(SurfaceResult.Fullscreen);
|
||||
break;
|
||||
case Keys.Enter:
|
||||
Close(SurfaceResult.Region);
|
||||
break;
|
||||
|
|
|
@ -166,13 +166,6 @@ public AreaManager(RectangleRegionForm surface)
|
|||
private void CreateContextMenu()
|
||||
{
|
||||
cmsContextMenu = new ContextMenuStrip();
|
||||
cmsContextMenu.KeyDown += (sender, e) =>
|
||||
{
|
||||
if (e.KeyCode == Keys.Space)
|
||||
{
|
||||
cmsContextMenu.Close();
|
||||
}
|
||||
};
|
||||
|
||||
foreach (ShapeType shapeType in Helpers.GetEnums<ShapeType>())
|
||||
{
|
||||
|
@ -405,9 +398,6 @@ private void surface_KeyDown(object sender, KeyEventArgs e)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case Keys.Space:
|
||||
cmsContextMenu.Show(Cursor.Position.X, Cursor.Position.Y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -595,12 +585,14 @@ private void surface_MouseUp(object sender, MouseEventArgs e)
|
|||
}
|
||||
else if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
CancelRegionSelection();
|
||||
|
||||
if (IsCreating)
|
||||
{
|
||||
EndRegionSelection();
|
||||
}
|
||||
else
|
||||
{
|
||||
cmsContextMenu.Show(surface, e.Location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -683,6 +675,7 @@ private void EndRegionSelection()
|
|||
|
||||
private void CancelRegionSelection()
|
||||
{
|
||||
// TODO
|
||||
BaseShape shape = AreaIntersect();
|
||||
|
||||
if (shape != null)
|
||||
|
|
Loading…
Reference in a new issue