mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Show editor background color on menu icon
This commit is contained in:
parent
a7e122b922
commit
2b5c9c7b11
1 changed files with 10 additions and 2 deletions
|
@ -49,7 +49,8 @@ internal partial class ShapeManager
|
|||
private ToolStripEx tsMain;
|
||||
private ToolStripButton tsbBorderColor, tsbFillColor, tsbHighlightColor;
|
||||
private ToolStripDropDownButton tsddbShapeOptions;
|
||||
private ToolStripMenuItem tsmiArrowHeadsBothSide, tsmiShadow, tsmiUndo, tsmiDelete, tsmiDeleteAll, tsmiMoveTop, tsmiMoveUp, tsmiMoveDown, tsmiMoveBottom, tsmiRegionCapture, tsmiQuickCrop, tsmiTips;
|
||||
private ToolStripMenuItem tsmiArrowHeadsBothSide, tsmiShadow, tsmiUndo, tsmiDelete, tsmiDeleteAll, tsmiMoveTop, tsmiMoveUp, tsmiMoveDown, tsmiMoveBottom,
|
||||
tsmiRegionCapture, tsmiQuickCrop, tsmiTips, tsmiEditorBackgroundColor;
|
||||
private ToolStripLabeledNumericUpDown tslnudBorderSize, tslnudCornerRadius, tslnudCenterPoints, tslnudBlurRadius, tslnudPixelateSize;
|
||||
private ToolStripLabel tslDragLeft, tslDragRight;
|
||||
private ToolStripLabeledComboBox tscbCursorTypes;
|
||||
|
@ -741,7 +742,7 @@ internal void CreateToolbar()
|
|||
tsmiEditorModeFullscreen.Click += (sender, e) => Options.EditorModeFullscreen = tsmiEditorModeFullscreen.Checked;
|
||||
tsddbOptions.DropDownItems.Add(tsmiEditorModeFullscreen);
|
||||
|
||||
ToolStripMenuItem tsmiEditorBackgroundColor = new ToolStripMenuItem("Editor background color...");
|
||||
tsmiEditorBackgroundColor = new ToolStripMenuItem("Editor background color...");
|
||||
tsmiEditorBackgroundColor.Click += (sender, e) =>
|
||||
{
|
||||
PauseForm();
|
||||
|
@ -749,6 +750,7 @@ internal void CreateToolbar()
|
|||
if (ColorPickerForm.PickColor(Options.EditorBackgroundColor, out Color newColor))
|
||||
{
|
||||
Options.EditorBackgroundColor = newColor;
|
||||
UpdateMenu();
|
||||
}
|
||||
|
||||
ResumeForm();
|
||||
|
@ -1276,6 +1278,12 @@ private void UpdateMenu()
|
|||
{
|
||||
tsmiRegionCapture.Visible = !Options.QuickCrop && ValidRegions.Length > 0;
|
||||
}
|
||||
|
||||
if (tsmiEditorBackgroundColor != null)
|
||||
{
|
||||
if (tsmiEditorBackgroundColor.Image != null) tsmiEditorBackgroundColor.Image.Dispose();
|
||||
tsmiEditorBackgroundColor.Image = ImageHelpers.CreateColorPickerIcon(Options.EditorBackgroundColor, new Rectangle(0, 0, 16, 16));
|
||||
}
|
||||
}
|
||||
|
||||
internal Cursor GetSelectedCursor()
|
||||
|
|
Loading…
Reference in a new issue