使用物理尺寸进行设置

This commit is contained in:
艾竹
2023-02-11 23:51:48 +08:00
parent 59bfed341d
commit f99fd93b3f
13 changed files with 333 additions and 231 deletions

View File

@@ -122,11 +122,11 @@ namespace AIStudio.Wpf.DiagramDesigner
{
get
{
return ConnectorWidth * (Root?.ScreenScale ?? 1d);
return ScreenHelper.WidthToMm(ConnectorWidth);
}
set
{
ConnectorWidth = value / (Root?.ScreenScale ?? 1d);
ConnectorWidth = ScreenHelper.MmToWidth(value);
}
}
@@ -134,11 +134,11 @@ namespace AIStudio.Wpf.DiagramDesigner
{
get
{
return ConnectorHeight * (Root?.ScreenScale ?? 1d);
return ScreenHelper.WidthToMm(ConnectorHeight);
}
set
{
ConnectorHeight = value / (Root?.ScreenScale ?? 1d);
ConnectorHeight = ScreenHelper.MmToWidth(value);
}
}
#endregion