Skip to content

Commit

Permalink
dont set fontsize if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Oct 20, 2024
1 parent 1b44d64 commit e136927
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,9 @@ private static void HandleXmlElement_TextBlock_Base(CustomDialog dialog, TextBlo
else if (foregroundBrush is string)
textBlock.SetResourceReference(TextBlock.ForegroundProperty, foregroundBrush);

textBlock.FontSize = ParseXmlAttribute<double>(xmlElement, "FontSize", 12);
var fontSize = ParseXmlAttributeNullable<double>(xmlElement, "FontSize");
if (fontSize is double)
textBlock.FontSize = (double)fontSize;
textBlock.FontWeight = GetFontWeightFromXElement(xmlElement);
textBlock.FontStyle = GetFontStyleFromXElement(xmlElement);

Expand Down

0 comments on commit e136927

Please sign in to comment.