mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-05 20:54:31 +13:00
Merge pull request #2883 from Jaex/editor-mode-fullscreen-option
Added editor mode fullscreen option
This commit is contained in:
commit
8185243519
3 changed files with 12 additions and 8 deletions
|
@ -82,6 +82,7 @@ public Color CurrentColor
|
|||
|
||||
internal ShapeManager ShapeManager { get; private set; }
|
||||
internal List<DrawableObject> DrawableObjects { get; private set; }
|
||||
internal bool Closing { get; private set; }
|
||||
|
||||
internal IContainer components = null;
|
||||
internal OpacityAnimation toolbarAnimation;
|
||||
|
@ -89,7 +90,6 @@ public Color CurrentColor
|
|||
|
||||
private InputManager InputManager => ShapeManager.InputManager;
|
||||
|
||||
private FormWindowState lastWindowState = FormWindowState.Minimized;
|
||||
private TextureBrush backgroundBrush, backgroundHighlightBrush;
|
||||
private GraphicsPath regionFillPath, regionDrawPath;
|
||||
private Pen borderPen, borderDotPen, borderDotStaticPen, textOuterBorderPen, textInnerBorderPen, markerPen;
|
||||
|
@ -146,7 +146,7 @@ private void InitializeComponent()
|
|||
Icon = ShareXResources.Icon;
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
|
||||
|
||||
if (!IsEditorMode)
|
||||
if (!IsEditorMode || Config.EditorModeFullscreen)
|
||||
{
|
||||
Text = "ShareX - " + Resources.BaseRegionForm_InitializeComponent_Region_capture;
|
||||
StartPosition = FormStartPosition.Manual;
|
||||
|
@ -280,11 +280,6 @@ private void OnMoved()
|
|||
{
|
||||
UpdateCoordinates();
|
||||
|
||||
if (IsEditorMode && WindowState != lastWindowState)
|
||||
{
|
||||
lastWindowState = WindowState;
|
||||
}
|
||||
|
||||
if (IsAnnotationMode && ShapeManager.ToolbarCreated)
|
||||
{
|
||||
ShapeManager.UpdateMenuPosition();
|
||||
|
@ -373,6 +368,8 @@ private void RegionCaptureForm_LocationChanged(object sender, EventArgs e)
|
|||
|
||||
private void RegionCaptureForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Closing = true;
|
||||
|
||||
if (IsEditorMode && Config.EditorModeRememberWindowState)
|
||||
{
|
||||
Config.EditorModeWindowState.UpdateFormState(this);
|
||||
|
|
|
@ -80,5 +80,6 @@ public class RegionCaptureOptions
|
|||
public bool EditorModeStartMaximized = true;
|
||||
public bool EditorModeRememberWindowState = false;
|
||||
public WindowState EditorModeWindowState = new WindowState();
|
||||
public bool EditorModeFullscreen = false;
|
||||
}
|
||||
}
|
|
@ -729,6 +729,12 @@ internal void CreateToolbar()
|
|||
tsmiEditorModeRememberWindowState.Click += (sender, e) => Config.EditorModeRememberWindowState = tsmiEditorModeRememberWindowState.Checked;
|
||||
tsddbOptions.DropDownItems.Add(tsmiEditorModeRememberWindowState);
|
||||
|
||||
ToolStripMenuItem tsmiEditorModeFullscreen = new ToolStripMenuItem("Fullscreen editor mode");
|
||||
tsmiEditorModeFullscreen.Checked = Config.EditorModeFullscreen;
|
||||
tsmiEditorModeFullscreen.CheckOnClick = true;
|
||||
tsmiEditorModeFullscreen.Click += (sender, e) => Config.EditorModeFullscreen = tsmiEditorModeFullscreen.Checked;
|
||||
tsddbOptions.DropDownItems.Add(tsmiEditorModeFullscreen);
|
||||
|
||||
tsddbOptions.DropDownItems.Add(new ToolStripSeparator());
|
||||
}
|
||||
|
||||
|
@ -1059,7 +1065,7 @@ private void SetMenuCollapsed(bool isCollapsed)
|
|||
|
||||
private void UpdateMenu()
|
||||
{
|
||||
if (menuForm == null) return;
|
||||
if (form.Closing || menuForm == null || menuForm.IsDisposed) return;
|
||||
|
||||
ShapeType shapeType = CurrentShapeType;
|
||||
|
||||
|
|
Loading…
Reference in a new issue