From 0f39f1514a249851102018e9ef14698a5a641646 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:56:50 +0000 Subject: [PATCH] add IgnoreTitleBarInset --- Bloxstrap/Resources/CustomBootstrapperSchema.json | 3 ++- .../UI/Elements/Bootstrapper/CustomDialog.Elements.cs | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Bloxstrap/Resources/CustomBootstrapperSchema.json b/Bloxstrap/Resources/CustomBootstrapperSchema.json index 11321f9..76acf5f 100644 --- a/Bloxstrap/Resources/CustomBootstrapperSchema.json +++ b/Bloxstrap/Resources/CustomBootstrapperSchema.json @@ -43,7 +43,8 @@ "IsCreatable": true, "Attributes": { "Theme": "Theme", - "Title": "string" + "Title": "string", + "IgnoreTitleBarInset": "bool" } }, "TitleBar": { diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs index ceb9caa..f393a50 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs @@ -401,6 +401,13 @@ namespace Bloxstrap.UI.Elements.Bootstrapper string? title = xmlElement.Attribute("Title")?.Value?.ToString() ?? "Bloxstrap"; dialog.Title = title; + bool ignoreTitleBarInset = ParseXmlAttribute(xmlElement, "IgnoreTitleBarInset", false); + if (ignoreTitleBarInset) + { + Grid.SetRow(dialog.ElementGrid, 0); + Grid.SetRowSpan(dialog.ElementGrid, 2); + } + return new DummyFrameworkElement(); }