This commit is contained in:
Sunny 2020-07-25 22:28:59 +08:00
parent 3a042a1798
commit eafc4ddab3
4 changed files with 26 additions and 40 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,24 +1,24 @@
/******************************************************************************
* SunnyUI
* CopyRight (C) 2012-2020 ShenYongHua().
* QQ群56829229 QQ17612584 EMailSunnyUI@qq.com
*
* Blog: https://www.cnblogs.com/yhuse
* Gitee: https://gitee.com/yhuse/SunnyUI
* GitHub: https://github.com/yhuse/SunnyUI
*
* SunnyUI.dll can be used for free under the GPL-3.0 license.
* If you use this code, please keep this note.
* 使
******************************************************************************
* : UICheckBox.cs
* :
* : V2.2
* : 2020-01-01
*
* 2020-01-01: V2.2.0
* 2020-04-16: V2.2.1 ReadOnly属性
* 2020-04-25: V2.2.4
* SunnyUI
* CopyRight (C) 2012-2020 ShenYongHua().
* QQ群56829229 QQ17612584 EMailSunnyUI@qq.com
*
* Blog: https://www.cnblogs.com/yhuse
* Gitee: https://gitee.com/yhuse/SunnyUI
* GitHub: https://github.com/yhuse/SunnyUI
*
* SunnyUI.dll can be used for free under the GPL-3.0 license.
* If you use this code, please keep this note.
* 使
******************************************************************************
* : UICheckBox.cs
* :
* : V2.2
* : 2020-01-01
*
* 2020-01-01: V2.2.0
* 2020-04-16: V2.2.1 ReadOnly属性
* 2020-04-25: V2.2.4
******************************************************************************/
using System;
@ -105,19 +105,6 @@ namespace Sunny.UI
}
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
if (RightToLeft == RightToLeft.Yes)
{
//设置按钮标题位置
Padding = new Padding(Padding.Left, Padding.Top, Padding.Right- _imageSize - _imageInterval * 2, Padding.Bottom);
//填充文字
Color color = foreColor;
color = Enabled ? color : UIDisableColor.Fore;
g.DrawString(Text, Font, color, Size, Padding, ContentAlignment.MiddleLeft);
}
else
{
//设置按钮标题位置
Padding = new Padding(_imageSize + _imageInterval * 2, Padding.Top, Padding.Right, Padding.Bottom);
@ -128,7 +115,6 @@ namespace Sunny.UI
g.DrawString(Text, Font, color, Size, Padding, ContentAlignment.MiddleLeft);
}
}
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{