Switch to fixed size nozzle widgets, revise sizing to fit

This commit is contained in:
jlewin 2019-03-06 18:05:00 -08:00
parent 3f2455c9fa
commit cc5d73f47a
3 changed files with 16 additions and 4 deletions

View file

@ -39,7 +39,7 @@ namespace MatterHackers.MatterControl
public class CalibrationLine : GuiWidget
{
public static Dictionary<int, IVertexSource> Glyphs { get; private set; }
private static int glyphSize = 8;
private static int glyphSize = 10;
private bool mouseInBounds;
private bool verticalLine;
@ -57,13 +57,13 @@ namespace MatterHackers.MatterControl
{
if (parentDirection == FlowDirection.LeftToRight)
{
this.Width = 8;
this.Width = glyphSize;
this.HAnchor = HAnchor.Absolute;
this.VAnchor = VAnchor.Stretch;
}
else
{
this.Height = 8;
this.Height = glyphSize;
this.HAnchor = HAnchor.Stretch;
this.VAnchor = VAnchor.Absolute;
}

View file

@ -57,9 +57,15 @@ namespace MatterHackers.MatterControl
templatePrinter = new NozzleOffsetTemplatePrinter(printer);
contentRow.Padding = theme.DefaultContainerPadding;
contentRow.AddChild(xOffsetWidget = new NozzleOffsetTemplateWidget(templatePrinter.ActiveOffsets, FlowDirection.LeftToRight, theme)
{
Padding = new BorderDouble(left: 4)
Padding = new BorderDouble(left: 4),
HAnchor = HAnchor.Absolute,
VAnchor = VAnchor.Absolute,
Height = 110,
Width = 420
});
xOffsetWidget.OffsetChanged += (s, e) =>
@ -82,6 +88,9 @@ namespace MatterHackers.MatterControl
{
Margin = new BorderDouble(top: 15),
Padding = new BorderDouble(bottom: 4),
VAnchor = VAnchor.Absolute,
HAnchor = HAnchor.Absolute,
Height = 420,
Width = 110
});