diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 5f061f7ce..e4aebc64c 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 5f061f7ce5892cfbb0982c09fc777ec8e3dbd1fe +Subproject commit e4aebc64c794bfa489db49ae826eb276ceb31428 diff --git a/Utilities/MarkdigAgg/AggCodeBlockRenderer.cs b/Utilities/MarkdigAgg/AggCodeBlockRenderer.cs index b1043a988..a640c49de 100644 --- a/Utilities/MarkdigAgg/AggCodeBlockRenderer.cs +++ b/Utilities/MarkdigAgg/AggCodeBlockRenderer.cs @@ -9,7 +9,7 @@ using MatterHackers.MatterControl; namespace Markdig.Renderers.Agg { - public class CodeBlockX : FlowLayoutWidget + public class CodeBlockX : FlowLeftRightWithWrapping { public CodeBlockX() { diff --git a/Utilities/MarkdigAgg/AggHeadingRenderer.cs b/Utilities/MarkdigAgg/AggHeadingRenderer.cs index df4b36aa7..27640df5f 100644 --- a/Utilities/MarkdigAgg/AggHeadingRenderer.cs +++ b/Utilities/MarkdigAgg/AggHeadingRenderer.cs @@ -9,7 +9,7 @@ using MatterHackers.MatterControl; namespace Markdig.Renderers.Agg { - public class HeadingRowX : FlowLayoutWidget + public class HeadingRowX : FlowLeftRightWithWrapping { public HeadingRowX() { @@ -24,8 +24,8 @@ namespace Markdig.Renderers.Agg { if (childToAdd is TextWidget textWidget) { - textWidget.TextColor = new Color("#036ac3"); - textWidget.PointSize = 11; + //textWidget.TextColor = new Color("#036ac3"); + textWidget.PointSize = 14; } base.AddChild(childToAdd, indexInChildrenList); diff --git a/Utilities/MarkdigAgg/AggListRenderer.cs b/Utilities/MarkdigAgg/AggListRenderer.cs index 3e0114052..9b95b6e62 100644 --- a/Utilities/MarkdigAgg/AggListRenderer.cs +++ b/Utilities/MarkdigAgg/AggListRenderer.cs @@ -21,7 +21,7 @@ namespace Markdig.Renderers.Agg this.VAnchor = VAnchor.Fit; this.HAnchor = HAnchor.Stretch; - this.Margin = new BorderDouble(0, 4, 0, 12); + //this.Margin = new BorderDouble(0, 4, 0, 12); } public override void AddChild(GuiWidget childToAdd, int indexInChildrenList = -1) @@ -39,17 +39,24 @@ namespace Markdig.Renderers.Agg public class ListItemX : FlowLayoutWidget { private ImageBuffer icon = AggContext.StaticData.LoadIcon("dot.png"); + private FlowLayoutWidget content; public ListItemX() { var theme = ApplicationController.Instance.Theme; this.VAnchor = VAnchor.Fit; - this.HAnchor = HAnchor.Fit | HAnchor.Left; - this.Margin = new BorderDouble(0, 4, 0, 12); + this.HAnchor = HAnchor.Stretch; + //this.Margin = new BorderDouble(0, 4, 0, 12); - this.AddChild(new ImageWidget(icon) + base.AddChild(new ImageWidget(icon) { - Margin = 3 + Margin = 3, + VAnchor = VAnchor.Top, + }); + + base.AddChild(content = new FlowLayoutWidget(FlowDirection.TopToBottom) + { + HAnchor = HAnchor.Stretch }); } @@ -57,7 +64,7 @@ namespace Markdig.Renderers.Agg { // Anything required...? - base.AddChild(childToAdd, indexInChildrenList); + content.AddChild(childToAdd, indexInChildrenList); } } diff --git a/Utilities/MarkdigAgg/AggParagraphRenderer.cs b/Utilities/MarkdigAgg/AggParagraphRenderer.cs index 1689797f0..7c5a7987f 100644 --- a/Utilities/MarkdigAgg/AggParagraphRenderer.cs +++ b/Utilities/MarkdigAgg/AggParagraphRenderer.cs @@ -16,7 +16,7 @@ namespace Markdig.Renderers.Agg } } - public class ParagraphX : FlowLayoutWidget + public class ParagraphX : FlowLeftRightWithWrapping { public ParagraphX() { diff --git a/Utilities/MarkdigAgg/AggRenderer.cs b/Utilities/MarkdigAgg/AggRenderer.cs index 7991bc09a..d21f256b8 100644 --- a/Utilities/MarkdigAgg/AggRenderer.cs +++ b/Utilities/MarkdigAgg/AggRenderer.cs @@ -25,14 +25,10 @@ namespace Markdig.Renderers } } - public class LineBreakX : ImageWidget + public class LineBreakX : GuiWidget, IHardBreak { - private static ImageBuffer icon = AggContext.StaticData.LoadIcon("Paragraph_16x.png"); - public LineBreakX() - : base(icon) { - Margin = new BorderDouble(4, 0); } }