From 48aaa5f56e954f965a3f907c16c350c30e3e1f35 Mon Sep 17 00:00:00 2001 From: Jaex Date: Fri, 30 Sep 2016 22:05:26 +0300 Subject: [PATCH] Fix toolstrip visual artifact in right side --- .../CustomToolStripProfessionalRenderer.cs | 40 +++++++++++++++++++ ShareX.HelpersLib/ShareX.HelpersLib.csproj | 1 + .../Shapes/ShapeManager.cs | 1 + 3 files changed, 42 insertions(+) create mode 100644 ShareX.HelpersLib/Controls/CustomToolStripProfessionalRenderer.cs diff --git a/ShareX.HelpersLib/Controls/CustomToolStripProfessionalRenderer.cs b/ShareX.HelpersLib/Controls/CustomToolStripProfessionalRenderer.cs new file mode 100644 index 000000000..5add006bf --- /dev/null +++ b/ShareX.HelpersLib/Controls/CustomToolStripProfessionalRenderer.cs @@ -0,0 +1,40 @@ +#region License Information (GPL v3) + +/* + ShareX - A program that allows you to take screenshots and share any file type + Copyright (c) 2007-2016 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 . +*/ + +#endregion License Information (GPL v3) + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace ShareX.HelpersLib +{ + public class CustomToolStripProfessionalRenderer : ToolStripProfessionalRenderer + { + protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) + { + } + } +} \ No newline at end of file diff --git a/ShareX.HelpersLib/ShareX.HelpersLib.csproj b/ShareX.HelpersLib/ShareX.HelpersLib.csproj index c51937111..fd00e86a6 100644 --- a/ShareX.HelpersLib/ShareX.HelpersLib.csproj +++ b/ShareX.HelpersLib/ShareX.HelpersLib.csproj @@ -84,6 +84,7 @@ + Component diff --git a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs index 574e50363..37544899f 100644 --- a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs +++ b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs @@ -268,6 +268,7 @@ private void CreateMenu() Location = new Point(0, 0), MinimumSize = new Size(100, 30), Padding = new Padding(0, 0, 0, 0), + Renderer = new CustomToolStripProfessionalRenderer(), TabIndex = 0, Text = "ToolStrip" };