* UICheckBoxGroup: 修复TitleTop为0时,条目显示错位的问题 #IB7STO
* UIRadioButtonGroup: 修复TitleTop为0时,条目显示错位的问题 #IB7STO
This commit is contained in:
parent
98d280d9f0
commit
120dbf2151
@ -27,6 +27,7 @@
|
|||||||
* 2023-11-07: V3.5.2 重写UICheckBoxGroup
|
* 2023-11-07: V3.5.2 重写UICheckBoxGroup
|
||||||
* 2023-12-04: V3.6.1 增加属性可修改图标大小
|
* 2023-12-04: V3.6.1 增加属性可修改图标大小
|
||||||
* 2024-09-09: V3.7.0 更改计算节点位置的方法,解决问题:#IAPY94
|
* 2024-09-09: V3.7.0 更改计算节点位置的方法,解决问题:#IAPY94
|
||||||
|
* 2024-11-29: V3.8.0 修复TitleTop为0时,条目显示错位的问题 #IB7STO
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@ -206,11 +207,13 @@ namespace Sunny.UI
|
|||||||
protected override void OnPaint(PaintEventArgs e)
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnPaint(e);
|
base.OnPaint(e);
|
||||||
|
if (TitleTop == 0 && Text.IsValid()) Text = "";
|
||||||
if (Items.Count == 0) return;
|
if (Items.Count == 0) return;
|
||||||
|
InitRects();
|
||||||
|
|
||||||
if (activeIndex >= 0 && CheckBoxRects.ContainsKey(activeIndex))
|
if (activeIndex >= 0 && CheckBoxRects.TryGetValue(activeIndex, out Rectangle boxRect))
|
||||||
{
|
{
|
||||||
e.Graphics.FillRectangle(hoverColor, CheckBoxRects[activeIndex]);
|
e.Graphics.FillRectangle(hoverColor, boxRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
int startX = StartPos.X;
|
int startX = StartPos.X;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
* 2023-11-09: V3.5.2 重写UIRadioButtonGroup
|
* 2023-11-09: V3.5.2 重写UIRadioButtonGroup
|
||||||
* 2023-12-04: V3.6.1 增加属性可修改图标大小
|
* 2023-12-04: V3.6.1 增加属性可修改图标大小
|
||||||
* 2024-09-09: V3.7.0 更改计算节点位置的方法,解决问题:#IAPY94
|
* 2024-09-09: V3.7.0 更改计算节点位置的方法,解决问题:#IAPY94
|
||||||
|
* 2024-11-29: V3.8.0 修复TitleTop为0时,条目显示错位的问题 #IB7STO
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@ -132,12 +133,13 @@ namespace Sunny.UI
|
|||||||
protected override void OnPaint(PaintEventArgs e)
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnPaint(e);
|
base.OnPaint(e);
|
||||||
|
if (TitleTop == 0 && Text.IsValid()) Text = "";
|
||||||
if (Items.Count == 0) return;
|
if (Items.Count == 0) return;
|
||||||
|
InitRects();
|
||||||
|
|
||||||
if (activeIndex >= 0 && CheckBoxRects.ContainsKey(activeIndex))
|
if (activeIndex >= 0 && CheckBoxRects.TryGetValue(activeIndex, out Rectangle boxRect))
|
||||||
{
|
{
|
||||||
e.Graphics.FillRectangle(hoverColor, CheckBoxRects[activeIndex]);
|
e.Graphics.FillRectangle(hoverColor, boxRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
int startX = StartPos.X;
|
int startX = StartPos.X;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user