Increased region capture toolbar button paddings that way it will be more easier to click them

This commit is contained in:
Jaex 2017-05-27 01:52:27 +03:00
parent 2c28856ff5
commit 1896448513

View file

@ -51,6 +51,7 @@ internal partial class ShapeManager
private ToolStripMenuItem tsmiShadow, tsmiUndo, tsmiDelete, tsmiDeleteAll, tsmiMoveTop, tsmiMoveUp, tsmiMoveDown, tsmiMoveBottom, tsmiRegionCapture, tsmiQuickCrop, tsmiTips;
private ToolStripLabeledNumericUpDown tslnudBorderSize, tslnudCornerRadius, tslnudBlurRadius, tslnudPixelateSize;
private ToolStripLabel tslDragLeft;
private int buttonPadding = 4;
private void CreateToolbar()
{
@ -749,16 +750,12 @@ private void CreateToolbar()
tslDragLeft.MouseLeave += TslDrag_MouseLeave;
tslDragRight.MouseLeave += TslDrag_MouseLeave;
tsMain.ResumeLayout(false);
tsMain.PerformLayout();
menuForm.ResumeLayout(false);
menuForm.Show(form);
foreach (ToolStripItem tsi in tsMain.Items.OfType<ToolStripItem>())
{
if (!string.IsNullOrEmpty(tsi.Text))
{
tsi.Padding = new Padding(buttonPadding);
tsi.MouseEnter += (sender, e) =>
{
Point pos = CaptureHelpers.ScreenToClient(menuForm.PointToScreen(tsi.Bounds.Location));
@ -773,6 +770,12 @@ private void CreateToolbar()
}
}
tsMain.ResumeLayout(false);
tsMain.PerformLayout();
menuForm.ResumeLayout(false);
menuForm.Show(form);
UpdateMenu();
CurrentShapeChanged += shape => UpdateMenu();