Changed main application to MVC. UI rework (Configuration Page esp. in progress).
This commit is contained in:
parent
e02655f847
commit
bdef196434
29 changed files with 1301 additions and 354 deletions
54
ConfigurationPage/SettingsViewBase.cs
Normal file
54
ConfigurationPage/SettingsViewBase.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.ImageProcessing;
|
||||
using MatterHackers.Agg.PlatformAbstract;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.ConfigurationPage.PrintLeveling;
|
||||
using MatterHackers.MatterControl.CustomWidgets;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.EeProm;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage
|
||||
{
|
||||
public class SettingsViewBase : AltGroupBox
|
||||
{
|
||||
protected readonly int TallButtonHeight = 25;
|
||||
protected TextImageButtonFactory textImageButtonFactory = new TextImageButtonFactory();
|
||||
protected LinkButtonFactory linkButtonFactory = new LinkButtonFactory();
|
||||
protected RGBA_Bytes separatorLineColor;
|
||||
protected FlowLayoutWidget mainContainer;
|
||||
|
||||
public SettingsViewBase(string title)
|
||||
: base(new TextWidget(title, pointSize: 18, textColor: ActiveTheme.Instance.SecondaryAccentColor))
|
||||
{
|
||||
SetDisplayAttributes();
|
||||
mainContainer = new FlowLayoutWidget(Agg.UI.FlowDirection.TopToBottom);
|
||||
mainContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||
mainContainer.Margin = new BorderDouble(left: 6);
|
||||
}
|
||||
|
||||
private void SetDisplayAttributes()
|
||||
{
|
||||
//this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
this.separatorLineColor = new RGBA_Bytes(ActiveTheme.Instance.PrimaryTextColor, 100);
|
||||
this.Margin = new BorderDouble(2, 4, 2, 0);
|
||||
this.textImageButtonFactory.normalFillColor = RGBA_Bytes.White;
|
||||
this.textImageButtonFactory.disabledFillColor = RGBA_Bytes.White;
|
||||
|
||||
this.textImageButtonFactory.FixedHeight = TallButtonHeight;
|
||||
this.textImageButtonFactory.fontSize = 11;
|
||||
|
||||
this.textImageButtonFactory.disabledTextColor = RGBA_Bytes.DarkGray;
|
||||
this.textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
this.textImageButtonFactory.normalTextColor = RGBA_Bytes.Black;
|
||||
this.textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
|
||||
this.linkButtonFactory.fontSize = 11;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue