mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Added ToolStripCheckedBoldRenderer to make checked items bold so it will be more easier to see image checked items also in high contrast theme
This commit is contained in:
parent
97bb0908b9
commit
a8770e001b
3 changed files with 51 additions and 0 deletions
47
ShareX.HelpersLib/Controls/ToolStripCheckedBoldRenderer.cs
Normal file
47
ShareX.HelpersLib/Controls/ToolStripCheckedBoldRenderer.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
#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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ShareX.HelpersLib
|
||||
{
|
||||
public class ToolStripCheckedBoldRenderer : ToolStripProfessionalRenderer
|
||||
{
|
||||
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
|
||||
{
|
||||
if (e.Item is ToolStripMenuItem && ((ToolStripMenuItem)e.Item).Checked)
|
||||
{
|
||||
e.TextFont = new Font(e.Item.Font, FontStyle.Bold);
|
||||
}
|
||||
|
||||
base.OnRenderItemText(e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -129,6 +129,7 @@
|
|||
<Compile Include="Controls\LabelNoCopy.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ToolStripCheckedBoldRenderer.cs" />
|
||||
<Compile Include="Controls\ToolStripButtonColorAnimation.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
|
|
@ -71,6 +71,9 @@ private void InitializeControls()
|
|||
niTray.Icon = ShareXResources.Icon;
|
||||
Text = Program.Title;
|
||||
|
||||
tsMain.Renderer = new ToolStripCheckedBoldRenderer();
|
||||
cmsTray.Renderer = new ToolStripCheckedBoldRenderer();
|
||||
|
||||
tsddbWorkflows.HideImageMargin();
|
||||
tsmiTrayWorkflows.HideImageMargin();
|
||||
tsmiMonitor.HideImageMargin();
|
||||
|
|
Loading…
Reference in a new issue