* UIForm: 可拖拽时Padding可以调整大小

This commit is contained in:
Sunny 2022-05-06 23:03:53 +08:00
parent 516e82f287
commit 959578c86e

View File

@ -33,6 +33,7 @@
* 2022-03-28: V3.1.1 * 2022-03-28: V3.1.1
* 2022-04-02: V3.1.2 AutoScaleMode为None * 2022-04-02: V3.1.2 AutoScaleMode为None
* 2022-04-26: V3.1.8 * 2022-04-26: V3.1.8
* 2022-05-06: V3.1.8 Padding可以调整大小
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -1641,7 +1642,7 @@ namespace Sunny.UI
{ {
ShowRect = true; ShowRect = true;
ShowRadius = false; ShowRadius = false;
Padding = new Padding(2, showTitle ? TitleHeight + 1 : 2, 2, 2); Padding = new Padding(Math.Max(Padding.Left, 2), showTitle ? TitleHeight + 1 : 2, Math.Max(Padding.Right, 2), Math.Max(Padding.Bottom, 2));
} }
else else
{ {