Revert "Added cursor type option to cursor drawing tool"

This reverts commit 92ff416ab6.
This commit is contained in:
Jaex 2017-08-14 09:46:54 +03:00
parent 92ff416ab6
commit 898daf4cc5
5 changed files with 2 additions and 86 deletions

View file

@ -1,46 +0,0 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2017 ShareX Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
*/
#endregion License Information (GPL v3)
using System.Windows.Forms;
using System.Windows.Forms.Design;
namespace ShareX.HelpersLib
{
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.MenuStrip | ToolStripItemDesignerAvailability.ContextMenuStrip)]
public class ToolStripLabeledComboBox : ToolStripControlHost
{
public LabeledNumericUpDown Content
{
get
{
return Control as LabeledNumericUpDown;
}
}
public ToolStripLabeledComboBox() : base(new LabeledNumericUpDown())
{
}
}
}

View file

@ -69,14 +69,6 @@ public static class Helpers
public static readonly Version OSVersion = Environment.OSVersion.Version;
public static Cursor[] CursorList = new Cursor[] {
Cursors.AppStarting, Cursors.Arrow, Cursors.Cross, Cursors.Default, Cursors.Hand, Cursors.Help,
Cursors.HSplit, Cursors.IBeam, Cursors.No, Cursors.NoMove2D, Cursors.NoMoveHoriz, Cursors.NoMoveVert,
Cursors.PanEast, Cursors.PanNE, Cursors.PanNorth, Cursors.PanNW, Cursors.PanSE, Cursors.PanSouth,
Cursors.PanSW, Cursors.PanWest, Cursors.SizeAll, Cursors.SizeNESW, Cursors.SizeNS, Cursors.SizeNWSE,
Cursors.SizeWE, Cursors.UpArrow, Cursors.VSplit, Cursors.WaitCursor
};
/// <summary>Get file name extension without dot.</summary>
public static string GetFilenameExtension(string filePath)
{

View file

@ -116,9 +116,6 @@
<Compile Include="Controls\ToolStripEx.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\ToolStripLabeledComboBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Helpers\JsonHelpers.cs" />
<Compile Include="Input\HotkeyInfo.cs" />
<Compile Include="Input\KeyboardHook.cs" />

View file

@ -61,7 +61,7 @@ public override void OnCreating()
{
Manager.IsMoving = true;
UpdateCursor(Manager.GetSelectedCursor().Handle, InputManager.MousePosition0Based);
UpdateCursor(Cursors.Arrow.Handle, InputManager.MousePosition0Based);
}
public override void OnDraw(Graphics g)

View file

@ -50,8 +50,7 @@ internal partial class ShapeManager
private ToolStripDropDownButton tsddbShapeOptions;
private ToolStripMenuItem tsmiArrowHeadsBothSide, tsmiShadow, tsmiUndo, tsmiDelete, tsmiDeleteAll, tsmiMoveTop, tsmiMoveUp, tsmiMoveDown, tsmiMoveBottom, tsmiRegionCapture, tsmiQuickCrop, tsmiTips;
private ToolStripLabeledNumericUpDown tslnudBorderSize, tslnudCornerRadius, tslnudCenterPoints, tslnudBlurRadius, tslnudPixelateSize;
private ToolStripLabel tslDragLeft, tslCursorType;
private ToolStripComboBox tscbCursorTypes;
private ToolStripLabel tslDragLeft;
private void CreateToolbar()
{
@ -474,20 +473,6 @@ private void CreateToolbar()
};
tsddbShapeOptions.DropDownItems.Add(tslnudCornerRadius);
tslCursorType = new ToolStripLabel("Cursor type:");
tsddbShapeOptions.DropDownItems.Add(tslCursorType);
tscbCursorTypes = new ToolStripComboBox();
tscbCursorTypes.DropDownStyle = ComboBoxStyle.DropDownList;
CursorConverter cursorConverter = new CursorConverter();
foreach (Cursor cursor in Helpers.CursorList)
{
string name = cursorConverter.ConvertToString(cursor);
tscbCursorTypes.Items.Add(name);
}
tscbCursorTypes.SelectedIndex = 3; // Cursors.Default
tsddbShapeOptions.DropDownItems.Add(tscbCursorTypes);
tslnudBlurRadius = new ToolStripLabeledNumericUpDown(Resources.ShapeManager_CreateContextMenu_Blur_radius_);
tslnudBlurRadius.Content.Minimum = 3;
tslnudBlurRadius.Content.Maximum = 199;
@ -1099,7 +1084,6 @@ private void UpdateMenu()
case ShapeType.DrawingTextBackground:
case ShapeType.DrawingSpeechBalloon:
case ShapeType.DrawingStep:
case ShapeType.DrawingCursor:
case ShapeType.EffectBlur:
case ShapeType.EffectPixelate:
tsddbShapeOptions.Visible = true;
@ -1159,7 +1143,6 @@ private void UpdateMenu()
tslnudCenterPoints.Visible = shapeType == ShapeType.DrawingLine || shapeType == ShapeType.DrawingArrow;
tsmiArrowHeadsBothSide.Visible = shapeType == ShapeType.DrawingArrow;
tslCursorType.Visible = tscbCursorTypes.Visible = shapeType == ShapeType.DrawingCursor;
tslnudBlurRadius.Visible = shapeType == ShapeType.EffectBlur;
tslnudPixelateSize.Visible = shapeType == ShapeType.EffectPixelate;
tsbHighlightColor.Visible = shapeType == ShapeType.EffectHighlight;
@ -1169,15 +1152,5 @@ private void UpdateMenu()
tsmiRegionCapture.Visible = !Config.QuickCrop && ValidRegions.Length > 0;
}
}
internal Cursor GetSelectedCursor()
{
if (tscbCursorTypes.SelectedIndex > -1)
{
return Helpers.CursorList[tscbCursorTypes.SelectedIndex];
}
return Cursors.Default;
}
}
}