Fix visual problem of toolstrip drop down menus and corners

This commit is contained in:
Jaex 2016-10-05 23:22:57 +03:00
parent 48f4ec9056
commit 83f1909eef
7 changed files with 24 additions and 6 deletions

View file

@ -23,18 +23,23 @@ You should have received a copy of the GNU General Public License
#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
{
public CustomToolStripProfessionalRenderer()
{
RoundedEdges = false;
}
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
{
if (e.ToolStrip.IsDropDown)
{
base.OnRenderToolStripBorder(e);
}
}
}
}

View file

@ -1153,6 +1153,16 @@ internal static string ShapeManager_CreateContextMenu_Width_ {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap test_32 {
get {
object obj = ResourceManager.GetObject("test_32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View file

@ -483,4 +483,7 @@ Distance: {6:0.00} px / Angle: {7:0.00}°</value>
<data name="layers" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layers.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="test_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\test_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

View file

@ -105,7 +105,7 @@ private void CreateMenu()
{
DisplayStyle = ToolStripItemDisplayStyle.Image,
Image = Resources.ui_radio_button_uncheck,
Margin = new Padding(0),
Margin = new Padding(0, 0, 2, 0),
Padding = new Padding(2)
};

View file

@ -165,6 +165,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\test_32.png" />
<None Include="Resources\layers.png" />
<None Include="Resources\eraser.png" />
<None Include="Resources\ui-radio-button-uncheck.png" />
@ -202,7 +203,6 @@
<None Include="Resources\layer-shape-ellipse.png" />
<None Include="Resources\layer-shape-round.png" />
<None Include="Resources\layer-shape.png" />
<None Include="Resources\minus.png" />
<None Include="Resources\counter-reset.png" />
<None Include="Resources\balloon-box-left.png" />
<None Include="Resources\clipboard.png" />