mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-09 02:36:35 +08:00
DiagramOption LayoutOption 参数整理
This commit is contained in:
@@ -1132,11 +1132,11 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
var mindThemeModel = MindThemeHelper.GetTheme(newMindTheme);
|
||||
if (mindThemeModel?.Dark == true)
|
||||
{
|
||||
PageBackground = Colors.Black;
|
||||
DiagramOption.LayoutOption.PageBackground = Colors.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
PageBackground = Colors.White;
|
||||
DiagramOption.LayoutOption.PageBackground = Colors.White;
|
||||
}
|
||||
roots.ForEach(p => p.MindTheme = newMindTheme);
|
||||
roots.SelectMany(p => p.GetChildren(true)).ToList().ForEach(item => { item.ThemeChange(); });
|
||||
@@ -1146,11 +1146,11 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
var mindThemeModel = MindThemeHelper.GetTheme(oldMindTheme);
|
||||
if (mindThemeModel?.Dark == true)
|
||||
{
|
||||
PageBackground = Colors.Black;
|
||||
DiagramOption.LayoutOption.PageBackground = Colors.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
PageBackground = Colors.White;
|
||||
DiagramOption.LayoutOption.PageBackground = Colors.White;
|
||||
}
|
||||
roots.ForEach(p => p.MindTheme = oldMindTheme);
|
||||
roots.SelectMany(p => p.GetChildren(true)).ToList().ForEach(item => { item.ThemeChange(); });
|
||||
@@ -1275,9 +1275,9 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
{
|
||||
|
||||
if (left == null)
|
||||
left = (PageSize.Width - rootitem.ItemWidth) / 2;
|
||||
left = (DiagramOption.LayoutOption.PageSize.Width - rootitem.ItemWidth) / 2;
|
||||
if (top == null)
|
||||
top = (PageSize.Height - rootitem.ItemHeight) / 2;
|
||||
top = (DiagramOption.LayoutOption.PageSize.Height - rootitem.ItemHeight) / 2;
|
||||
var offset = rootitem.Offset;
|
||||
rootitem.Left = left.Value;
|
||||
rootitem.Top = top.Value;
|
||||
|
||||
Reference in New Issue
Block a user