Getting mark down to look more like sample site

This commit is contained in:
LarsBrubaker 2018-06-22 07:57:25 -07:00
parent c14e07d5b0
commit 8762358bde
6 changed files with 20 additions and 17 deletions

@ -1 +1 @@
Subproject commit 5f061f7ce5892cfbb0982c09fc777ec8e3dbd1fe
Subproject commit e4aebc64c794bfa489db49ae826eb276ceb31428

View file

@ -9,7 +9,7 @@ using MatterHackers.MatterControl;
namespace Markdig.Renderers.Agg
{
public class CodeBlockX : FlowLayoutWidget
public class CodeBlockX : FlowLeftRightWithWrapping
{
public CodeBlockX()
{

View file

@ -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);

View file

@ -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);
}
}

View file

@ -16,7 +16,7 @@ namespace Markdig.Renderers.Agg
}
}
public class ParagraphX : FlowLayoutWidget
public class ParagraphX : FlowLeftRightWithWrapping
{
public ParagraphX()
{

View file

@ -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);
}
}