Made Styled Message Box have scroll
Made multiple errors display better
This commit is contained in:
parent
34b57c43b0
commit
c079a9592f
5 changed files with 12 additions and 7 deletions
|
|
@ -2254,7 +2254,7 @@ namespace MatterHackers.MatterControl
|
|||
var errors = SettingsValidation.SettingsValid(printer);
|
||||
if(errors.Count > 0)
|
||||
{
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n\n\n\n", errors.ToArray()), "Slice Error".Localize());
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n__________________\n\n", errors.ToArray()), "Slice Error".Localize());
|
||||
}
|
||||
else // there are no erros continue printing
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,16 +79,21 @@ namespace MatterHackers.MatterControl
|
|||
responseCallback = callback;
|
||||
unwrappedMessage = message;
|
||||
|
||||
var scrollable = new ScrollableWidget(true);
|
||||
scrollable.AnchorAll();
|
||||
scrollable.ScrollArea.HAnchor = HAnchor.Stretch;
|
||||
contentRow.AddChild(scrollable);
|
||||
|
||||
if (useMarkdown)
|
||||
{
|
||||
contentRow.AddChild(messageContainer = new MarkdownWidget(theme)
|
||||
scrollable.AddChild(messageContainer = new MarkdownWidget(theme)
|
||||
{
|
||||
Markdown = message,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
contentRow.AddChild(messageContainer = new TextWidget(message, textColor: theme.TextColor, pointSize: 12 * DeviceScale)
|
||||
scrollable.AddChild(messageContainer = new TextWidget(message, textColor: theme.TextColor, pointSize: 12 * DeviceScale)
|
||||
{
|
||||
AutoExpandBoundsToText = true,
|
||||
HAnchor = HAnchor.Left
|
||||
|
|
@ -99,7 +104,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
foreach (GuiWidget widget in extraWidgetsToAdd)
|
||||
{
|
||||
contentRow.AddChild(widget);
|
||||
scrollable.AddChild(widget);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n\n\n\n", exportErrors.ToArray()), "Export Error".Localize());
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n__________________\n\n", exportErrors.ToArray()), "Export Error".Localize());
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -547,7 +547,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
if(errors.Count > 0)
|
||||
{
|
||||
doSlicing = false;
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n\n\n\n", errors.ToArray()), "Slicing Error".Localize());
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n__________________\n\n", errors.ToArray()), "Slicing Error".Localize());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
if (errors.Count > 0)
|
||||
{
|
||||
doSlicing = false;
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n\n\n\n", errors.ToArray()), "Slicing Error".Localize());
|
||||
StyledMessageBox.ShowMessageBox(String.Join("\n__________________\n\n", errors.ToArray()), "Slicing Error".Localize());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue