From e136927f18ab9751784073530393428b0d08d8dc Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Sun, 20 Oct 2024 01:47:17 +0100 Subject: [PATCH] dont set fontsize if not set --- Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index de9e364..87a1501 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -549,7 +549,9 @@ namespace Bloxstrap.UI.Elements.Bootstrapper else if (foregroundBrush is string) textBlock.SetResourceReference(TextBlock.ForegroundProperty, foregroundBrush); - textBlock.FontSize = ParseXmlAttribute(xmlElement, "FontSize", 12); + var fontSize = ParseXmlAttributeNullable(xmlElement, "FontSize"); + if (fontSize is double) + textBlock.FontSize = (double)fontSize; textBlock.FontWeight = GetFontWeightFromXElement(xmlElement); textBlock.FontStyle = GetFontStyleFromXElement(xmlElement);