mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Changes to make the context menu work on multiple items
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1629 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
0398e831db
commit
08d56090c4
7 changed files with 186 additions and 127 deletions
|
@ -101,17 +101,11 @@ namespace Greenshot.Drawing {
|
|||
cursor.DrawStretched(graphics, Bounds);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddContextMenuItems(ContextMenuStrip menu) {
|
||||
base.AddContextMenuItems(menu);
|
||||
ToolStripMenuItem resetItem = new ToolStripMenuItem("Reset size");
|
||||
resetItem.Click += delegate {
|
||||
this.Invalidate();
|
||||
Width = cursor.Size.Width;
|
||||
Height = cursor.Size.Height;
|
||||
this.Invalidate();
|
||||
};
|
||||
menu.Items.Add(resetItem);
|
||||
|
||||
public override Size DefaultSize {
|
||||
get {
|
||||
return cursor.Size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue