Making bold markdown wrap
This commit is contained in:
parent
6ff1c4fdf8
commit
5ff04ba2f1
6 changed files with 14 additions and 49 deletions
|
|
@ -183,7 +183,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
|
||||
public bool ValidateControls()
|
||||
{
|
||||
bool selectionValid = this.SelectedPrinter is AddPrinterWidget.MakeModelInfo selectedPrinter;
|
||||
bool selectionValid = this.SelectedPrinter is MakeModelInfo selectedPrinter;
|
||||
|
||||
if (!selectionValid)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ namespace MatterHackers.MatterControl.Library.Widgets.HardwarePage
|
|||
|
||||
public bool ShowProducts { get; set; } = true;
|
||||
|
||||
public override async void OnLoad(EventArgs args)
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.StoreID)
|
||||
&& File.Exists(printerInfo.ProfilePath))
|
||||
|
|
@ -166,7 +166,6 @@ namespace MatterHackers.MatterControl.Library.Widgets.HardwarePage
|
|||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
//private void CreateProductDataWidgets(PrinterSettings printerSettings, ProductSkuData product)
|
||||
private void CreateProductDataWidgets(ProductSkuData product)
|
||||
{
|
||||
var row = new FlowLayoutWidget()
|
||||
|
|
@ -194,12 +193,13 @@ namespace MatterHackers.MatterControl.Library.Widgets.HardwarePage
|
|||
|
||||
var description = new MarkdownWidget(theme)
|
||||
{
|
||||
MinimumSize = new VectorMath.Vector2(50, 0),
|
||||
MinimumSize = new Vector2(50, 0),
|
||||
HAnchor = HAnchor.Stretch,
|
||||
VAnchor = VAnchor.Fit,
|
||||
AutoScroll = false,
|
||||
Markdown = product.ProductDescription.Trim()
|
||||
};
|
||||
|
||||
descriptionBackground.AddChild(description);
|
||||
descriptionBackground.BeforeDraw += (s, e) =>
|
||||
{
|
||||
|
|
@ -245,40 +245,7 @@ namespace MatterHackers.MatterControl.Library.Widgets.HardwarePage
|
|||
addonsColumn.AddChild(addOnRow);
|
||||
}
|
||||
}
|
||||
|
||||
//if (false)
|
||||
//{
|
||||
// var settingsPanel = new GuiWidget()
|
||||
// {
|
||||
// HAnchor = HAnchor.Stretch,
|
||||
// VAnchor = VAnchor.Stretch,
|
||||
// MinimumSize = new VectorMath.Vector2(20, 20),
|
||||
// DebugShowBounds = true
|
||||
// };
|
||||
|
||||
// settingsPanel.Load += (s, e) =>
|
||||
// {
|
||||
// var printer = new PrinterConfig(printerSettings);
|
||||
|
||||
// var settingsContext = new SettingsContext(
|
||||
// printer,
|
||||
// null,
|
||||
// NamedSettingsLayers.All);
|
||||
|
||||
// settingsPanel.AddChild(
|
||||
// new ConfigurePrinterWidget(settingsContext, printer, theme)
|
||||
// {
|
||||
// HAnchor = HAnchor.Stretch,
|
||||
// VAnchor = VAnchor.Stretch,
|
||||
// });
|
||||
// };
|
||||
|
||||
// this.AddChild(new SectionWidget("Settings", settingsPanel, theme, expanded: false, setContentVAnchor: false)
|
||||
// {
|
||||
// VAnchor = VAnchor.Stretch
|
||||
// });
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
private GuiWidget AddHeading(ImageBuffer icon, string text)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,23 +30,21 @@ either expressed or implied, of the FreeBSD Project.
|
|||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
using System;
|
||||
|
||||
namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||
{
|
||||
public class ColorField : UIField
|
||||
{
|
||||
private ItemColorButton colorWidget;
|
||||
private ThemeConfig theme;
|
||||
private Action<Action<Color>> getPickedColor;
|
||||
private ThemeConfig theme;
|
||||
private Color initialColor;
|
||||
|
||||
public ColorField(ThemeConfig theme)
|
||||
public ColorField(ThemeConfig theme, Color initialColor, Action<Action<Color>> getPickedColor)
|
||||
{
|
||||
this.getPickedColor = getPickedColor;
|
||||
this.theme = theme;
|
||||
}
|
||||
|
||||
public ColorField(ThemeConfig theme, Color initialColor)
|
||||
: this(theme)
|
||||
{
|
||||
this.initialColor = initialColor;
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +58,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
var container = new FlowLayoutWidget();
|
||||
|
||||
colorWidget = new ItemColorButton(theme, initialColor);
|
||||
colorWidget = new ItemColorButton(theme, initialColor, getPickedColor);
|
||||
colorWidget.ColorChanged += (s, e) =>
|
||||
{
|
||||
this.SetValue(Color.Html, true);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Markdig.Renderers.Agg
|
|||
}
|
||||
}
|
||||
|
||||
public class ParagraphX : FlowLeftRightWithWrapping
|
||||
public class ParagraphX : FlowLeftRightWithWrapping, IHardBreak
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using MatterHackers.Agg.UI;
|
|||
|
||||
namespace Markdig.Renderers.Agg.Inlines
|
||||
{
|
||||
public class EmphasisInlineX : FlowLayoutWidget
|
||||
public class EmphasisInlineX : FlowLayoutWidget, IWrapChildrenSeparatly
|
||||
{
|
||||
private char delimiter;
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 0ea5548c2bdd91e3daa3769609ead4554e193ea2
|
||||
Subproject commit e53350017c3b8ebb2c8c028a07f5fe958aecb74a
|
||||
Loading…
Add table
Add a link
Reference in a new issue