Merge branch 'development' of https://github.com/MatterHackers/MatterControl into development
This commit is contained in:
commit
c28e6daaae
7 changed files with 77 additions and 29 deletions
|
|
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl.ContactForm
|
|||
{
|
||||
GuiWidget labelContainer = new GuiWidget();
|
||||
labelContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||
labelContainer.Height = height;
|
||||
labelContainer.Height = height * TextWidget.GlobalPointSizeScaleRatio;
|
||||
|
||||
TextWidget formLabel = new TextWidget(labelText, pointSize: fontSize);
|
||||
formLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@ namespace MatterHackers.MatterControl
|
|||
this.TabBar.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
this.TabBar.BorderColor = new RGBA_Bytes(0, 0, 0, 0);
|
||||
this.TabBar.Margin = new BorderDouble(0, 0);
|
||||
this.TabBar.Padding = new BorderDouble(0, 2);
|
||||
this.TabBar.Padding = new BorderDouble(0, 4);
|
||||
|
||||
this.Margin = new BorderDouble(top: 4);
|
||||
this.Margin = new BorderDouble(top: 0);
|
||||
this.TabTextSize = 15;
|
||||
|
||||
ActivePrinterProfile.Instance.ActivePrinterChanged.RegisterEvent(LoadSettingsOnPrinterChanged, ref unregisterEvents);
|
||||
|
|
@ -110,12 +110,7 @@ namespace MatterHackers.MatterControl
|
|||
ActiveTheme.Instance.SecondaryAccentColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||
|
||||
|
||||
|
||||
GuiWidget manualPrinterControls = new ManualPrinterControls();
|
||||
ScrollableWidget manualPrinterControlsWidget = new ScrollableWidget(true);
|
||||
manualPrinterControlsWidget.ScrollArea.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
|
||||
manualPrinterControlsWidget.AnchorAll();
|
||||
manualPrinterControlsWidget.AddChild(manualPrinterControls);
|
||||
GuiWidget manualPrinterControls = new ManualControlsWidget();
|
||||
|
||||
part3DViewContainer = new GuiWidget();
|
||||
part3DViewContainer.AnchorAll();
|
||||
|
|
@ -136,7 +131,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
//Add the tab contents for 'Advanced Controls'
|
||||
string printerControlsLabel = LocalizedString.Get("Controls").ToUpper();
|
||||
manualControlsPage = new TabPage(manualPrinterControlsWidget, printerControlsLabel);
|
||||
manualControlsPage = new TabPage(manualPrinterControls, printerControlsLabel);
|
||||
this.AddTab(new SimpleTextTabWidget(manualControlsPage, "Controls Tab", TabTextSize,
|
||||
ActiveTheme.Instance.SecondaryAccentColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||
|
||||
|
|
@ -196,14 +191,15 @@ namespace MatterHackers.MatterControl
|
|||
void reloadControlsWidget()
|
||||
{
|
||||
|
||||
GuiWidget manualPrinterControls = new ManualPrinterControls();
|
||||
ScrollableWidget manualPrinterControlsWidget = new ScrollableWidget(true);
|
||||
manualPrinterControlsWidget.ScrollArea.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
|
||||
manualPrinterControlsWidget.AnchorAll();
|
||||
manualPrinterControlsWidget.AddChild(manualPrinterControls);
|
||||
GuiWidget manualPrinterControls = new ManualControlsWidget();
|
||||
|
||||
//ScrollableWidget manualPrinterControlsWidget = new ScrollableWidget(true);
|
||||
//manualPrinterControlsWidget.ScrollArea.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
|
||||
//manualPrinterControlsWidget.AnchorAll();
|
||||
//manualPrinterControlsWidget.AddChild(manualPrinterControls);
|
||||
|
||||
manualControlsPage.RemoveAllChildren();
|
||||
manualControlsPage.AddChild(manualPrinterControlsWidget);
|
||||
manualControlsPage.AddChild(manualPrinterControls);
|
||||
}
|
||||
|
||||
void reloadConfigurationWidget()
|
||||
|
|
|
|||
|
|
@ -52,7 +52,10 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
public abstract class ApplicationView : GuiWidget
|
||||
{
|
||||
public abstract void AddElements();
|
||||
public TopContainerWidget TopContainer;
|
||||
|
||||
public abstract void AddElements();
|
||||
public abstract void ToggleTopContainer();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -60,12 +63,19 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
CompactTabView widescreenPanel;
|
||||
QueueDataView queueDataView;
|
||||
GuiWidget menuSeparator;
|
||||
public CompactApplicationView()
|
||||
{
|
||||
AddElements();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public override void ToggleTopContainer()
|
||||
{
|
||||
this.menuSeparator.Visible = this.TopContainer.Visible;
|
||||
this.TopContainer.Visible = !this.TopContainer.Visible;
|
||||
}
|
||||
|
||||
public override void AddElements()
|
||||
{
|
||||
this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
|
|
@ -73,33 +83,53 @@ namespace MatterHackers.MatterControl
|
|||
FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
||||
container.AnchorAll();
|
||||
|
||||
TopContainer = new TopContainerWidget();
|
||||
TopContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
ApplicationMenuRow menuRow = new ApplicationMenuRow();
|
||||
container.AddChild(menuRow);
|
||||
TopContainer.AddChild(menuRow);
|
||||
|
||||
GuiWidget menuSeparator = new GuiWidget();
|
||||
menuSeparator.BackgroundColor = new RGBA_Bytes(200, 200, 200);
|
||||
menuSeparator.Height = 2;
|
||||
menuSeparator = new GuiWidget();
|
||||
menuSeparator.Height = 12;
|
||||
menuSeparator.HAnchor = HAnchor.ParentLeftRight;
|
||||
menuSeparator.Margin = new BorderDouble(3, 6, 3, 3);
|
||||
|
||||
container.AddChild(menuSeparator);
|
||||
menuSeparator.MinimumSize = new Vector2(0, 12);
|
||||
menuSeparator.Visible = false;
|
||||
|
||||
queueDataView = new QueueDataView();
|
||||
container.AddChild(new ActionBarPlus(queueDataView));
|
||||
TopContainer.AddChild(new ActionBarPlus(queueDataView));
|
||||
TopContainer.SetOriginalHeight();
|
||||
|
||||
container.AddChild(TopContainer);
|
||||
container.AddChild(new PrintProgressBar());
|
||||
container.AddChild(menuSeparator);
|
||||
widescreenPanel = new CompactTabView(queueDataView);
|
||||
container.AddChild(widescreenPanel);
|
||||
|
||||
this.AddChild(container);
|
||||
}
|
||||
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
this.AnchorAll();
|
||||
}
|
||||
}
|
||||
|
||||
public class TopContainerWidget : FlowLayoutWidget
|
||||
{
|
||||
double originalHeight;
|
||||
public TopContainerWidget()
|
||||
: base(FlowDirection.TopToBottom)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void SetOriginalHeight()
|
||||
{
|
||||
originalHeight = this.Height;
|
||||
}
|
||||
}
|
||||
|
||||
public class ResponsiveApplicationView : ApplicationView
|
||||
{
|
||||
WidescreenPanel widescreenPanel;
|
||||
|
|
@ -108,6 +138,11 @@ namespace MatterHackers.MatterControl
|
|||
AddElements();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public override void ToggleTopContainer()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void AddElements()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
break;
|
||||
|
||||
case EnableLevel.ConfigOnly:
|
||||
disableOverlay.Margin = new BorderDouble(0, 0, 0, 26);
|
||||
|
||||
disableOverlay.Margin = new BorderDouble(0, 0, 0, 26) * TextWidget.GlobalPointSizeScaleRatio;;
|
||||
disableOverlay.Visible = true;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,13 @@ namespace MatterHackers.MatterControl
|
|||
container.AddChild(printTimeRemaining);
|
||||
|
||||
AddChild(container);
|
||||
|
||||
ClickWidget clickOverlay = new ClickWidget();
|
||||
clickOverlay.AnchorAll();
|
||||
clickOverlay.Click += onProgressBarClick;
|
||||
|
||||
AddChild(clickOverlay);
|
||||
|
||||
AddHandlers();
|
||||
SetThemedColors();
|
||||
UpdatePrintStatus();
|
||||
|
|
@ -64,6 +71,11 @@ namespace MatterHackers.MatterControl
|
|||
ActiveTheme.Instance.ThemeChanged.RegisterEvent(ThemeChanged, ref unregisterEvents);
|
||||
}
|
||||
|
||||
public void onProgressBarClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
ApplicationController.Instance.MainView.ToggleTopContainer();
|
||||
}
|
||||
|
||||
public override void OnClosed(EventArgs e)
|
||||
{
|
||||
if (unregisterEvents != null)
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
}
|
||||
|
||||
TextWidget subheader = new TextWidget("Fine-tune adjustment while actively printing", pointSize: 8, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||
subheader.Margin = new BorderDouble(bottom: 6);
|
||||
subheader.Margin = new BorderDouble(bottom:6);
|
||||
tuningRatiosLayout.AddChild(subheader);
|
||||
TextWidget feedRateDescription;
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,12 +27,16 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
protected override void AddChildElements()
|
||||
{
|
||||
AltGroupBox temperatureGroupBox = new AltGroupBox(new TextWidget("Temperature".Localize(), pointSize: 18, textColor: ActiveTheme.Instance.SecondaryAccentColor));
|
||||
temperatureGroupBox.Margin = new BorderDouble(2, 4, 2, 5);
|
||||
temperatureGroupBox.Margin = new BorderDouble(0);
|
||||
|
||||
FlowLayoutWidget mainContainer = new FlowLayoutWidget(Agg.UI.FlowDirection.TopToBottom);
|
||||
mainContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||
mainContainer.Margin = new BorderDouble(left: 0);
|
||||
|
||||
TextWidget subheader = new TextWidget("Temporarily override target temperature", pointSize: 8, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||
subheader.Margin = new BorderDouble(bottom:6);
|
||||
mainContainer.AddChild(subheader);
|
||||
|
||||
temperatureGroupBox.AddChild(mainContainer);
|
||||
RGBA_Bytes separatorLineColor = new RGBA_Bytes(ActiveTheme.Instance.PrimaryTextColor, 100);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue