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
|
@ -116,17 +116,17 @@ namespace Greenshot.Drawing {
|
|||
graphics.DrawImage(bitmap, Bounds);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddContextMenuItems(ContextMenuStrip menu) {
|
||||
base.AddContextMenuItems(menu);
|
||||
ToolStripMenuItem resetItem = new ToolStripMenuItem("Reset size");
|
||||
resetItem.Click += delegate {
|
||||
this.Invalidate();
|
||||
Width = Bitmap.Width;
|
||||
Height = Bitmap.Height;
|
||||
this.Invalidate();
|
||||
};
|
||||
menu.Items.Add(resetItem);
|
||||
|
||||
public override bool hasDefaultSize {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override Size DefaultSize {
|
||||
get {
|
||||
return bitmap.Size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue