Lots of theme and UI related updates.
This commit is contained in:
parent
caa660fc22
commit
738b2d5a57
15 changed files with 275 additions and 151 deletions
|
|
@ -194,7 +194,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string statusStringBeg = LocalizedString.Get("Status");
|
string statusStringBeg = LocalizedString.Get("STATUS");
|
||||||
string statusString = string.Format("{1}: {0}", PrinterCommunication.Instance.PrinterConnectionStatusVerbose, statusStringBeg);
|
string statusString = string.Format("{1}: {0}", PrinterCommunication.Instance.PrinterConnectionStatusVerbose, statusStringBeg);
|
||||||
printerStatusText.Text = string.Format(statusString,PrinterCommunication.Instance.PrinterConnectionStatusVerbose);
|
printerStatusText.Text = string.Format(statusString,PrinterCommunication.Instance.PrinterConnectionStatusVerbose);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,11 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
|
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
{
|
{
|
||||||
actionBarButtonFactory.normalTextColor = RGBA_Bytes.White;
|
actionBarButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
actionBarButtonFactory.hoverTextColor = RGBA_Bytes.White;
|
actionBarButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
actionBarButtonFactory.pressedTextColor = RGBA_Bytes.White;
|
actionBarButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
|
|
||||||
actionBarButtonFactory.disabledTextColor = RGBA_Bytes.LightGray;
|
actionBarButtonFactory.disabledTextColor = ActiveTheme.Instance.TabLabelUnselected;
|
||||||
actionBarButtonFactory.disabledFillColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
actionBarButtonFactory.disabledFillColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||||
actionBarButtonFactory.disabledBorderColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
actionBarButtonFactory.disabledBorderColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||||
|
|
||||||
|
|
@ -46,15 +46,15 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
protected override void AddChildElements()
|
protected override void AddChildElements()
|
||||||
{
|
{
|
||||||
actionBarButtonFactory.invertImageLocation = false;
|
actionBarButtonFactory.invertImageLocation = false;
|
||||||
string connectString = LocalizedString.Get("Connect");
|
string connectString = LocalizedString.Get("CONNECT");
|
||||||
connectPrinterButton = actionBarButtonFactory.Generate(connectString, "icon_power_32x32.png");
|
connectPrinterButton = actionBarButtonFactory.Generate(connectString, "icon_power_32x32.png");
|
||||||
connectPrinterButton.Margin = new BorderDouble(3, 0);
|
connectPrinterButton.Margin = new BorderDouble(0, 0, 3);
|
||||||
connectPrinterButton.VAnchor = VAnchor.ParentCenter;
|
connectPrinterButton.VAnchor = VAnchor.ParentCenter;
|
||||||
connectPrinterButton.Cursor = Cursors.Hand;
|
connectPrinterButton.Cursor = Cursors.Hand;
|
||||||
|
|
||||||
string disconnectString = LocalizedString.Get("Disconnect");
|
string disconnectString = LocalizedString.Get("DISCONNECT");
|
||||||
disconnectPrinterButton = actionBarButtonFactory.Generate(disconnectString, "icon_power_32x32.png");
|
disconnectPrinterButton = actionBarButtonFactory.Generate(disconnectString, "icon_power_32x32.png");
|
||||||
disconnectPrinterButton.Margin = new BorderDouble(3, 0);
|
disconnectPrinterButton.Margin = new BorderDouble(0, 0, 3);
|
||||||
disconnectPrinterButton.VAnchor = VAnchor.ParentCenter;
|
disconnectPrinterButton.VAnchor = VAnchor.ParentCenter;
|
||||||
disconnectPrinterButton.Visible = false;
|
disconnectPrinterButton.Visible = false;
|
||||||
disconnectPrinterButton.Cursor = Cursors.Hand;
|
disconnectPrinterButton.Cursor = Cursors.Hand;
|
||||||
|
|
@ -62,13 +62,15 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
selectActivePrinterButton = new PrinterSelectButton();
|
selectActivePrinterButton = new PrinterSelectButton();
|
||||||
selectActivePrinterButton.HAnchor = HAnchor.ParentLeftRight;
|
selectActivePrinterButton.HAnchor = HAnchor.ParentLeftRight;
|
||||||
selectActivePrinterButton.Cursor = Cursors.Hand;
|
selectActivePrinterButton.Cursor = Cursors.Hand;
|
||||||
|
selectActivePrinterButton.Margin = new BorderDouble(0, 6);
|
||||||
|
|
||||||
|
|
||||||
actionBarButtonFactory.invertImageLocation = true;
|
actionBarButtonFactory.invertImageLocation = true;
|
||||||
|
|
||||||
this.AddChild(connectPrinterButton);
|
this.AddChild(connectPrinterButton);
|
||||||
this.AddChild(disconnectPrinterButton);
|
this.AddChild(disconnectPrinterButton);
|
||||||
this.AddChild(selectActivePrinterButton);
|
this.AddChild(selectActivePrinterButton);
|
||||||
this.AddChild(CreateOptionsMenu());
|
//this.AddChild(CreateOptionsMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiWidget CreateOptionsMenu()
|
GuiWidget CreateOptionsMenu()
|
||||||
|
|
@ -79,8 +81,8 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
|
|
||||||
FlowLayoutWidget leftToRight = new FlowLayoutWidget();
|
FlowLayoutWidget leftToRight = new FlowLayoutWidget();
|
||||||
leftToRight.Margin = new BorderDouble(5, 0);
|
leftToRight.Margin = new BorderDouble(5, 0);
|
||||||
string optionsString = LocalizedString.Get("Options");
|
string optionsString = LocalizedString.Get("OPTIONS");
|
||||||
TextWidget optionsText = new TextWidget(optionsString, textColor: RGBA_Bytes.White);
|
TextWidget optionsText = new TextWidget(optionsString, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
optionsText.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
optionsText.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
||||||
optionsText.Margin = new BorderDouble(0, 0, 3, 0);
|
optionsText.Margin = new BorderDouble(0, 0, 3, 0);
|
||||||
leftToRight.AddChild(optionsText);
|
leftToRight.AddChild(optionsText);
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ namespace MatterHackers.MatterControl
|
||||||
public RootedObjectEventHandler ReloadPanelTrigger = new RootedObjectEventHandler();
|
public RootedObjectEventHandler ReloadPanelTrigger = new RootedObjectEventHandler();
|
||||||
public RootedObjectEventHandler SetUpdateNotificationTrigger = new RootedObjectEventHandler();
|
public RootedObjectEventHandler SetUpdateNotificationTrigger = new RootedObjectEventHandler();
|
||||||
bool widescreenMode;
|
bool widescreenMode;
|
||||||
|
event EventHandler unregisterEvents;
|
||||||
|
|
||||||
public bool WidescreenMode
|
public bool WidescreenMode
|
||||||
{
|
{
|
||||||
|
|
@ -73,9 +74,11 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ApplicationWidget()
|
public ApplicationWidget()
|
||||||
{
|
{
|
||||||
Name = "MainSlidePanel";
|
Name = "MainSlidePanel";
|
||||||
|
ActiveTheme.Instance.ThemeChanged.RegisterEvent(ReloadAll, ref unregisterEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddElements()
|
public void AddElements()
|
||||||
|
|
@ -86,6 +89,15 @@ namespace MatterHackers.MatterControl
|
||||||
SetUpdateNotification(this, null);
|
SetUpdateNotification(this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ReloadAll(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
UiThread.RunOnIdle((state) =>
|
||||||
|
{
|
||||||
|
this.RemoveAllChildren();
|
||||||
|
this.AddChild(new WidescreenPanel());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public static ApplicationWidget Instance
|
public static ApplicationWidget Instance
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
||||||
|
|
@ -60,16 +60,12 @@ namespace MatterHackers.MatterControl
|
||||||
RGBA_Bytes unselectedTextColor = ActiveTheme.Instance.TabLabelUnselected;
|
RGBA_Bytes unselectedTextColor = ActiveTheme.Instance.TabLabelUnselected;
|
||||||
SliceSettingsWidget.UiState sliceSettingsUiState;
|
SliceSettingsWidget.UiState sliceSettingsUiState;
|
||||||
|
|
||||||
FlowLayoutWidget ColumnZero;
|
|
||||||
FlowLayoutWidget ColumnOne;
|
FlowLayoutWidget ColumnOne;
|
||||||
FlowLayoutWidget ColumnTwo;
|
FlowLayoutWidget ColumnTwo;
|
||||||
int ColumnTwoMinWidth = 1390;
|
int ColumnTwoMinWidth = 1390;
|
||||||
FlowLayoutWidget ColumnThree;
|
FlowLayoutWidget ColumnThree;
|
||||||
int ColumnThreeMinWidth = 990;
|
int ColumnThreeMinWidth = 990;
|
||||||
|
|
||||||
ActionBarPlus actionBarPlus;
|
|
||||||
QueueTab queueTab;
|
|
||||||
|
|
||||||
View3DTransformPart part3DView;
|
View3DTransformPart part3DView;
|
||||||
GcodeViewBasic partGcodeView;
|
GcodeViewBasic partGcodeView;
|
||||||
|
|
||||||
|
|
@ -203,18 +199,18 @@ namespace MatterHackers.MatterControl
|
||||||
manualPrinterControlsScrollArea.AddChild(manualPrinterControls);
|
manualPrinterControlsScrollArea.AddChild(manualPrinterControls);
|
||||||
|
|
||||||
//Add the tab contents for 'Advanced Controls'
|
//Add the tab contents for 'Advanced Controls'
|
||||||
string printerControlsLabel = LocalizedString.Get("Controls");
|
string printerControlsLabel = LocalizedString.Get("CONTROLS");
|
||||||
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(manualPrinterControlsScrollArea, printerControlsLabel), 18,
|
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(manualPrinterControlsScrollArea, printerControlsLabel), 16,
|
||||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||||
|
|
||||||
string sliceSettingsLabel = LocalizedString.Get("Slice Settings");
|
string sliceSettingsLabel = LocalizedString.Get("SLICE SETTINGS");
|
||||||
sliceSettingsWidget = new SliceSettingsWidget(sliceSettingsUiState);
|
sliceSettingsWidget = new SliceSettingsWidget(sliceSettingsUiState);
|
||||||
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(sliceSettingsWidget, sliceSettingsLabel), 18,
|
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(sliceSettingsWidget, sliceSettingsLabel), 16,
|
||||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||||
|
|
||||||
string configurationLabel = LocalizedString.Get("Configuration");
|
string configurationLabel = LocalizedString.Get("CONFIGURATION");
|
||||||
ScrollableWidget configurationControls = new ConfigurationPage();
|
ScrollableWidget configurationControls = new ConfigurationPage();
|
||||||
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(configurationControls, configurationLabel), 18,
|
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(configurationControls, configurationLabel), 16,
|
||||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||||
|
|
||||||
return advancedControls;
|
return advancedControls;
|
||||||
|
|
@ -423,17 +419,17 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
this.Margin = new BorderDouble(top: 4);
|
this.Margin = new BorderDouble(top: 4);
|
||||||
|
|
||||||
QueueTabPage = new TabPage(new QueueControlsWidget(), "Queue");
|
QueueTabPage = new TabPage(new QueueControlsWidget(), "QUEUE");
|
||||||
this.AddTab(new SimpleTextTabWidget(QueueTabPage, 18,
|
this.AddTab(new SimpleTextTabWidget(QueueTabPage, 16,
|
||||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||||
|
|
||||||
LibraryTabPage = new TabPage(new PrintLibraryWidget(), "Library");
|
LibraryTabPage = new TabPage(new PrintLibraryWidget(), "LIBRARY");
|
||||||
this.AddTab(new SimpleTextTabWidget(LibraryTabPage, 18,
|
this.AddTab(new SimpleTextTabWidget(LibraryTabPage, 16,
|
||||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||||
|
|
||||||
AboutTabPage = new TabPage(new AboutPage(), "About");
|
AboutTabPage = new TabPage(new AboutPage(), "ABOUT");
|
||||||
AboutTabView = new SimpleTextTabWidget(AboutTabPage, 18,
|
AboutTabView = new SimpleTextTabWidget(AboutTabPage, 16,
|
||||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes());
|
ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes());
|
||||||
this.AddTab(AboutTabView);
|
this.AddTab(AboutTabView);
|
||||||
|
|
||||||
NumQueueItemsChanged(this, null);
|
NumQueueItemsChanged(this, null);
|
||||||
|
|
@ -443,7 +439,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
void NumQueueItemsChanged(object sender, EventArgs widgetEvent)
|
void NumQueueItemsChanged(object sender, EventArgs widgetEvent)
|
||||||
{
|
{
|
||||||
string queueStringBeg = LocalizedString.Get("Queue");
|
string queueStringBeg = LocalizedString.Get("QUEUE");
|
||||||
string queueString = string.Format("{1} ({0})", PrintQueue.PrintQueueControl.Instance.Count, queueStringBeg);
|
string queueString = string.Format("{1} ({0})", PrintQueue.PrintQueueControl.Instance.Count, queueStringBeg);
|
||||||
QueueTabPage.Text = string.Format(queueString, PrintQueue.PrintQueueControl.Instance.Count);
|
QueueTabPage.Text = string.Format(queueString, PrintQueue.PrintQueueControl.Instance.Count);
|
||||||
}
|
}
|
||||||
|
|
@ -466,7 +462,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
UpdateControl.NeedToCheckForUpdateFirstTimeEver = false;
|
UpdateControl.NeedToCheckForUpdateFirstTimeEver = false;
|
||||||
addedUpdateMark = new NotificationWidget();
|
addedUpdateMark = new NotificationWidget();
|
||||||
addedUpdateMark.OriginRelativeParent = new Vector2(63, 10);
|
addedUpdateMark.OriginRelativeParent = new Vector2(72, 10);
|
||||||
AboutTabView.AddChild(addedUpdateMark);
|
AboutTabView.AddChild(addedUpdateMark);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
@ -479,7 +475,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
addedUpdateMark.Visible = false;
|
addedUpdateMark.Visible = false;
|
||||||
}
|
}
|
||||||
AboutTabPage.Text = string.Format("About");
|
AboutTabPage.Text = string.Format("ABOUT");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ using MatterHackers.RenderOpenGl;
|
||||||
using MatterHackers.VectorMath;
|
using MatterHackers.VectorMath;
|
||||||
using MatterHackers.Agg.VertexSource;
|
using MatterHackers.Agg.VertexSource;
|
||||||
using MatterHackers.MatterControl.DataStorage;
|
using MatterHackers.MatterControl.DataStorage;
|
||||||
|
using MatterHackers.Agg.ImageProcessing;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
|
|
@ -76,8 +77,13 @@ namespace MatterHackers.MatterControl
|
||||||
container.AddChild(leftSpace);
|
container.AddChild(leftSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image != null)
|
if (image != null && image.Width > 0)
|
||||||
{
|
{
|
||||||
|
if (!ActiveTheme.Instance.IsDarkTheme)
|
||||||
|
{
|
||||||
|
InvertLightness.DoInvertLightness(image);
|
||||||
|
}
|
||||||
|
|
||||||
imageWidget = new ImageWidget(image);
|
imageWidget = new ImageWidget(image);
|
||||||
imageWidget.VAnchor = VAnchor.ParentCenter;
|
imageWidget.VAnchor = VAnchor.ParentCenter;
|
||||||
container.AddChild(imageWidget);
|
container.AddChild(imageWidget);
|
||||||
|
|
@ -187,6 +193,11 @@ namespace MatterHackers.MatterControl
|
||||||
string path = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, imageName);
|
string path = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, imageName);
|
||||||
ImageBuffer buffer = new ImageBuffer(10, 10, 32, new BlenderBGRA());
|
ImageBuffer buffer = new ImageBuffer(10, 10, 32, new BlenderBGRA());
|
||||||
ImageIO.LoadImageData(path, buffer);
|
ImageIO.LoadImageData(path, buffer);
|
||||||
|
|
||||||
|
if (!ActiveTheme.Instance.IsDarkTheme)
|
||||||
|
{
|
||||||
|
InvertLightness.DoInvertLightness(buffer);
|
||||||
|
}
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -197,7 +208,7 @@ namespace MatterHackers.MatterControl
|
||||||
editButton = new Button(0, 0, new ButtonViewThreeImage(LoadUpButtonImage("icon_edit_white.png"), LoadUpButtonImage("icon_edit_gray.png"), LoadUpButtonImage("icon_edit_Black.png")));
|
editButton = new Button(0, 0, new ButtonViewThreeImage(LoadUpButtonImage("icon_edit_white.png"), LoadUpButtonImage("icon_edit_gray.png"), LoadUpButtonImage("icon_edit_Black.png")));
|
||||||
editButton.Margin = new BorderDouble(2, -2, 2, 0);
|
editButton.Margin = new BorderDouble(2, -2, 2, 0);
|
||||||
editButton.VAnchor = Agg.UI.VAnchor.ParentTop;
|
editButton.VAnchor = Agg.UI.VAnchor.ParentTop;
|
||||||
TextWidget textLabel = new TextWidget(label, textColor: RGBA_Bytes.White);
|
TextWidget textLabel = new TextWidget(label, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
textLabel.VAnchor = Agg.UI.VAnchor.ParentTop;
|
textLabel.VAnchor = Agg.UI.VAnchor.ParentTop;
|
||||||
groupLableAndEditControl.AddChild(textLabel);
|
groupLableAndEditControl.AddChild(textLabel);
|
||||||
groupLableAndEditControl.AddChild(editButton);
|
groupLableAndEditControl.AddChild(editButton);
|
||||||
|
|
@ -329,6 +340,26 @@ namespace MatterHackers.MatterControl
|
||||||
pressedText = label;
|
pressedText = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (normalToPressedImageName == null)
|
||||||
|
{
|
||||||
|
normalToPressedImageName = pressedImageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pressedImageName == null)
|
||||||
|
{
|
||||||
|
pressedImageName = normalToPressedImageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pressedToNormalImageName == null)
|
||||||
|
{
|
||||||
|
pressedToNormalImageName = normalImageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (normalImageName == "icon_arrow_right_no_border_32x32.png")
|
||||||
|
{
|
||||||
|
int a = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (normalImageName != null)
|
if (normalImageName != null)
|
||||||
{
|
{
|
||||||
ImageIO.LoadImageData(this.GetImageLocation(normalImageName), normalImage);
|
ImageIO.LoadImageData(this.GetImageLocation(normalImageName), normalImage);
|
||||||
|
|
@ -349,20 +380,7 @@ namespace MatterHackers.MatterControl
|
||||||
ImageIO.LoadImageData(this.GetImageLocation(pressedToNormalImageName), pressedToNormalImage);
|
ImageIO.LoadImageData(this.GetImageLocation(pressedToNormalImageName), pressedToNormalImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (normalToPressedImageName == null)
|
|
||||||
{
|
|
||||||
normalToPressedImage = pressedImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pressedImageName == null)
|
|
||||||
{
|
|
||||||
pressedImage = normalToPressedImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pressedToNormalImageName == null)
|
|
||||||
{
|
|
||||||
pressedToNormalImage = normalImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (invertImageLocation)
|
if (invertImageLocation)
|
||||||
{
|
{
|
||||||
|
|
@ -394,6 +412,10 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
iconImage = new ImageBuffer();
|
iconImage = new ImageBuffer();
|
||||||
ImageIO.LoadImageData(this.GetImageLocation(iconImageName), iconImage);
|
ImageIO.LoadImageData(this.GetImageLocation(iconImageName), iconImage);
|
||||||
|
if (!ActiveTheme.Instance.IsDarkTheme)
|
||||||
|
{
|
||||||
|
InvertLightness.DoInvertLightness(iconImage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BorderDouble internalMargin = new BorderDouble(0);
|
BorderDouble internalMargin = new BorderDouble(0);
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,14 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsDarkTheme
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return loadedTheme.DarkTheme;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public RGBA_Bytes TransparentDarkOverlay
|
public RGBA_Bytes TransparentDarkOverlay
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -56,6 +64,7 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public RGBA_Bytes TabLabelSelected
|
public RGBA_Bytes TabLabelSelected
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -72,6 +81,13 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RGBA_Bytes SecondaryTextColor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return loadedTheme.secondaryTextColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public RGBA_Bytes PrimaryBackgroundColor
|
public RGBA_Bytes PrimaryBackgroundColor
|
||||||
{
|
{
|
||||||
|
|
@ -175,18 +191,36 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
//Generate a list of available theme definitions
|
//Generate a list of available theme definitions
|
||||||
List<Theme> themeList = new List<Theme>();
|
List<Theme> themeList = new List<Theme>();
|
||||||
themeList.Add(new Theme("Blue", new RGBA_Bytes(0, 75, 139), new RGBA_Bytes(0, 103, 190)));
|
|
||||||
|
|
||||||
themeList.Add(new Theme("Teal", new RGBA_Bytes(0, 130, 153), new RGBA_Bytes(0, 173, 204)));
|
themeList.Add(new Theme("Dark Blue", new RGBA_Bytes(0, 75, 139), new RGBA_Bytes(0, 103, 190)));
|
||||||
|
themeList.Add(new Theme("Blue", new RGBA_Bytes(0, 75, 139), new RGBA_Bytes(0, 103, 190), false));
|
||||||
|
|
||||||
themeList.Add(new Theme("Green", new RGBA_Bytes(0, 138, 23), new RGBA_Bytes(0, 189, 32)));
|
themeList.Add(new Theme("Teal", new RGBA_Bytes(0, 130, 153), new RGBA_Bytes(0, 173, 204)));
|
||||||
themeList.Add(new Theme("Light Blue", new RGBA_Bytes(93, 178, 255), new RGBA_Bytes(144, 202, 255)));
|
themeList.Add(new Theme("Teal", new RGBA_Bytes(0, 130, 153), new RGBA_Bytes(0, 173, 204), false));
|
||||||
themeList.Add(new Theme("Orange", new RGBA_Bytes(255, 129, 25), new RGBA_Bytes(255, 157, 76)));
|
|
||||||
|
themeList.Add(new Theme("Green", new RGBA_Bytes(0, 138, 23), new RGBA_Bytes(0, 189, 32)));
|
||||||
|
themeList.Add(new Theme("Green", new RGBA_Bytes(0, 138, 23), new RGBA_Bytes(0, 189, 32), false));
|
||||||
|
|
||||||
|
themeList.Add(new Theme("Light Blue", new RGBA_Bytes(93, 178, 255), new RGBA_Bytes(144, 202, 255)));
|
||||||
|
themeList.Add(new Theme("Light Blue", new RGBA_Bytes(93, 178, 255), new RGBA_Bytes(144, 202, 255), false));
|
||||||
|
|
||||||
|
themeList.Add(new Theme("Orange", new RGBA_Bytes(255, 129, 25), new RGBA_Bytes(255, 157, 76)));
|
||||||
|
themeList.Add(new Theme("Orange", new RGBA_Bytes(255, 129, 25), new RGBA_Bytes(255, 157, 76), false));
|
||||||
|
|
||||||
themeList.Add(new Theme("Purple", new RGBA_Bytes(70, 23, 180), new RGBA_Bytes(104, 51, 229)));
|
themeList.Add(new Theme("Purple", new RGBA_Bytes(70, 23, 180), new RGBA_Bytes(104, 51, 229)));
|
||||||
themeList.Add(new Theme("Red", new RGBA_Bytes(172, 25, 61), new RGBA_Bytes(217, 31, 77)));
|
themeList.Add(new Theme("Purple", new RGBA_Bytes(70, 23, 180), new RGBA_Bytes(104, 51, 229), false));
|
||||||
themeList.Add(new Theme("Pink", new RGBA_Bytes(220, 79, 173), new RGBA_Bytes(233, 143, 203)));
|
|
||||||
themeList.Add(new Theme("Grey", new RGBA_Bytes(88, 88, 88), new RGBA_Bytes(114, 114, 114)));
|
themeList.Add(new Theme("Red", new RGBA_Bytes(172, 25, 61), new RGBA_Bytes(217, 31, 77)));
|
||||||
themeList.Add(new Theme("Pink", new RGBA_Bytes(140, 0, 149), new RGBA_Bytes(188,0,200)));
|
themeList.Add(new Theme("Red", new RGBA_Bytes(172, 25, 61), new RGBA_Bytes(217, 31, 77), false));
|
||||||
|
|
||||||
|
themeList.Add(new Theme("Pink", new RGBA_Bytes(220, 79, 173), new RGBA_Bytes(233, 143, 203)));
|
||||||
|
themeList.Add(new Theme("Pink", new RGBA_Bytes(220, 79, 173), new RGBA_Bytes(233, 143, 203), false));
|
||||||
|
|
||||||
|
themeList.Add(new Theme("Grey", new RGBA_Bytes(88, 88, 88), new RGBA_Bytes(114, 114, 114)));
|
||||||
|
themeList.Add(new Theme("Grey", new RGBA_Bytes(88, 88, 88), new RGBA_Bytes(114, 114, 114), false));
|
||||||
|
|
||||||
|
themeList.Add(new Theme("Pink", new RGBA_Bytes(140, 0, 149), new RGBA_Bytes(188,0,200)));
|
||||||
|
themeList.Add(new Theme("Pink", new RGBA_Bytes(140, 0, 149), new RGBA_Bytes(188, 0, 200), false));
|
||||||
return themeList;
|
return themeList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -202,9 +236,13 @@ namespace MatterHackers.MatterControl
|
||||||
public RGBA_Bytes tabLabelSelectedColor;
|
public RGBA_Bytes tabLabelSelectedColor;
|
||||||
public RGBA_Bytes tabLabelUnselectedColor;
|
public RGBA_Bytes tabLabelUnselectedColor;
|
||||||
public string name;
|
public string name;
|
||||||
|
bool darkTheme;
|
||||||
|
|
||||||
|
public bool DarkTheme { get { return darkTheme; } }
|
||||||
|
|
||||||
public Theme(string name, RGBA_Bytes primary, RGBA_Bytes secondary, bool darkTheme = true)
|
public Theme(string name, RGBA_Bytes primary, RGBA_Bytes secondary, bool darkTheme = true)
|
||||||
{
|
{
|
||||||
|
this.darkTheme = darkTheme;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
||||||
if (darkTheme)
|
if (darkTheme)
|
||||||
|
|
@ -215,20 +253,22 @@ namespace MatterHackers.MatterControl
|
||||||
this.primaryBackgroundColor = new RGBA_Bytes(68, 68, 68);
|
this.primaryBackgroundColor = new RGBA_Bytes(68, 68, 68);
|
||||||
this.secondaryBackgroundColor = new RGBA_Bytes(51, 51, 51);
|
this.secondaryBackgroundColor = new RGBA_Bytes(51, 51, 51);
|
||||||
this.tabLabelSelectedColor = new RGBA_Bytes(255, 255, 255);
|
this.tabLabelSelectedColor = new RGBA_Bytes(255, 255, 255);
|
||||||
this.tabLabelUnselectedColor = new RGBA_Bytes(200, 200, 200);
|
this.tabLabelUnselectedColor = new RGBA_Bytes(180, 180, 180);
|
||||||
this.primaryTextColor = new RGBA_Bytes(255, 255, 255);
|
this.primaryTextColor = new RGBA_Bytes(255, 255, 255);
|
||||||
|
this.secondaryTextColor = new RGBA_Bytes(40, 40, 40);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.primaryAccentColor = secondary;
|
this.primaryAccentColor = secondary;
|
||||||
this.secondaryAccentColor = primary;
|
this.secondaryAccentColor = primary;
|
||||||
|
|
||||||
this.primaryBackgroundColor = new RGBA_Bytes(169, 169, 169);
|
this.primaryBackgroundColor = new RGBA_Bytes(208, 208, 208);
|
||||||
this.secondaryBackgroundColor = new RGBA_Bytes(208, 208, 208);
|
this.secondaryBackgroundColor = new RGBA_Bytes(185, 185, 185);
|
||||||
this.tabLabelSelectedColor = new RGBA_Bytes(255, 255, 255);
|
this.tabLabelSelectedColor = new RGBA_Bytes(51, 51, 51);
|
||||||
this.tabLabelUnselectedColor = new RGBA_Bytes(200, 200, 200);
|
this.tabLabelUnselectedColor = new RGBA_Bytes(102, 102, 102);
|
||||||
this.primaryTextColor = new RGBA_Bytes(255, 255, 255);
|
this.primaryTextColor = new RGBA_Bytes(34, 34, 34);
|
||||||
|
this.secondaryTextColor = new RGBA_Bytes(51, 51, 51);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,7 @@ namespace MatterHackers.Agg.UI
|
||||||
|
|
||||||
private void SetDisplayAttributes()
|
private void SetDisplayAttributes()
|
||||||
{
|
{
|
||||||
this.TextColor = RGBA_Bytes.White;
|
this.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
this.NormalColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
this.NormalColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||||
this.HoverColor = RGBA_Bytes.Gray;
|
this.HoverColor = RGBA_Bytes.Gray;
|
||||||
this.MenuItemsBorderWidth = 1;
|
this.MenuItemsBorderWidth = 1;
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,13 @@ namespace MatterHackers.MatterControl
|
||||||
//colorText.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
//colorText.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
||||||
//this.AddChild(colorText);
|
//this.AddChild(colorText);
|
||||||
//Temporary theme changer button
|
//Temporary theme changer button
|
||||||
GuiWidget themeButtons = new GuiWidget(96, 42);
|
GuiWidget themeButtons = new GuiWidget(186, 42);
|
||||||
|
|
||||||
|
int themeCount = ActiveTheme.Instance.AvailableThemes.Count;
|
||||||
|
|
||||||
themeButtons.BackgroundColor = RGBA_Bytes.White;
|
themeButtons.BackgroundColor = RGBA_Bytes.White;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (int x = 0; x < 5; x++)
|
for (int x = 0; x < themeCount/2; x++)
|
||||||
{
|
{
|
||||||
for (int y = 0; y < 2; y++)
|
for (int y = 0; y < 2; y++)
|
||||||
{
|
{
|
||||||
|
|
@ -49,7 +52,7 @@ namespace MatterHackers.MatterControl
|
||||||
index++;
|
index++;
|
||||||
themeButtons.AddChild(colorButton);
|
themeButtons.AddChild(colorButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
themeButtons.Margin = new BorderDouble(2);
|
themeButtons.Margin = new BorderDouble(2);
|
||||||
this.AddChild(themeButtons);
|
this.AddChild(themeButtons);
|
||||||
this.VAnchor = VAnchor.ParentCenter;
|
this.VAnchor = VAnchor.ParentCenter;
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
BorderDouble buttonMargin = new BorderDouble(top: 3);
|
BorderDouble buttonMargin = new BorderDouble(top: 3);
|
||||||
|
|
||||||
expandModelOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Model"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
string label = LocalizedString.Get("MODEL");
|
||||||
|
expandModelOptions = expandMenuOptionFactory.GenerateCheckBoxButton(label, "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||||
expandModelOptions.Margin = new BorderDouble(bottom: 2);
|
expandModelOptions.Margin = new BorderDouble(bottom: 2);
|
||||||
buttonRightPanel.AddChild(expandModelOptions);
|
buttonRightPanel.AddChild(expandModelOptions);
|
||||||
expandModelOptions.Checked = true;
|
expandModelOptions.Checked = true;
|
||||||
|
|
@ -232,7 +233,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
//modelOptionsContainer.Visible = false;
|
//modelOptionsContainer.Visible = false;
|
||||||
buttonRightPanel.AddChild(modelOptionsContainer);
|
buttonRightPanel.AddChild(modelOptionsContainer);
|
||||||
|
|
||||||
expandLayerOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Layer"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
expandLayerOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("LAYER"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||||
expandLayerOptions.Margin = new BorderDouble(bottom: 2);
|
expandLayerOptions.Margin = new BorderDouble(bottom: 2);
|
||||||
//buttonRightPanel.AddChild(expandLayerOptions);
|
//buttonRightPanel.AddChild(expandLayerOptions);
|
||||||
|
|
||||||
|
|
@ -241,7 +242,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
layerOptionsContainer.Visible = false;
|
layerOptionsContainer.Visible = false;
|
||||||
buttonRightPanel.AddChild(layerOptionsContainer);
|
buttonRightPanel.AddChild(layerOptionsContainer);
|
||||||
|
|
||||||
expandDisplayOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Display"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
expandDisplayOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("DISPLAY"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||||
expandDisplayOptions.Margin = new BorderDouble(bottom: 2);
|
expandDisplayOptions.Margin = new BorderDouble(bottom: 2);
|
||||||
buttonRightPanel.AddChild(expandDisplayOptions);
|
buttonRightPanel.AddChild(expandDisplayOptions);
|
||||||
expandDisplayOptions.Checked = true;
|
expandDisplayOptions.Checked = true;
|
||||||
|
|
@ -279,10 +280,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
modelInfoContainer.HAnchor = HAnchor.ParentLeftRight;
|
modelInfoContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||||
modelInfoContainer.Padding = new BorderDouble(5);
|
modelInfoContainer.Padding = new BorderDouble(5);
|
||||||
|
|
||||||
string printTimeLbl = LocalizedString.Get ("Print Time");
|
string printTimeLbl = LocalizedString.Get ("PRINT TIME");
|
||||||
string printTimeLblFull = string.Format ("{0}:", printTimeLbl);
|
string printTimeLblFull = string.Format ("{0}:", printTimeLbl);
|
||||||
// put in the print time
|
// put in the print time
|
||||||
modelInfoContainer.AddChild(new TextWidget(printTimeLblFull, textColor: RGBA_Bytes.White));
|
modelInfoContainer.AddChild(new TextWidget(printTimeLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize:10));
|
||||||
{
|
{
|
||||||
string timeRemainingText = "---";
|
string timeRemainingText = "---";
|
||||||
|
|
||||||
|
|
@ -302,42 +303,42 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0}", timeRemainingText), textColor: RGBA_Bytes.White, pointSize: 10);
|
GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0}", timeRemainingText), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 14);
|
||||||
estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
|
//estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
|
||||||
estimatedPrintTime.Margin = new BorderDouble(3, 0, 0, 3);
|
estimatedPrintTime.Margin = new BorderDouble(0, 9, 0 ,3);
|
||||||
modelInfoContainer.AddChild(estimatedPrintTime);
|
modelInfoContainer.AddChild(estimatedPrintTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
//modelInfoContainer.AddChild(new TextWidget("Size:", textColor: RGBA_Bytes.White));
|
//modelInfoContainer.AddChild(new TextWidget("Size:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
|
|
||||||
string filamentLengthLbl = LocalizedString.Get ("Filament Length");
|
string filamentLengthLbl = LocalizedString.Get ("FILAMENT LENGTH");
|
||||||
string filamentLengthLblFull = string.Format ("{0}:", filamentLengthLbl);
|
string filamentLengthLblFull = string.Format ("{0}:", filamentLengthLbl);
|
||||||
// show the filament used
|
// show the filament used
|
||||||
modelInfoContainer.AddChild(new TextWidget(filamentLengthLblFull, textColor: RGBA_Bytes.White));
|
modelInfoContainer.AddChild(new TextWidget(filamentLengthLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 9));
|
||||||
{
|
{
|
||||||
double filamentUsed = gcodeViewWidget.LoadedGCode.GetFilamentUsedMm(ActiveSliceSettings.Instance.NozzleDiameter);
|
double filamentUsed = gcodeViewWidget.LoadedGCode.GetFilamentUsedMm(ActiveSliceSettings.Instance.NozzleDiameter);
|
||||||
|
|
||||||
GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.0} mm", filamentUsed), textColor: RGBA_Bytes.White, pointSize: 10);
|
GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.0} mm", filamentUsed), pointSize: 14, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
|
//estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
|
||||||
estimatedPrintTime.Margin = new BorderDouble(3, 0, 0, 3);
|
estimatedPrintTime.Margin = new BorderDouble(0, 9, 0, 3);
|
||||||
modelInfoContainer.AddChild(estimatedPrintTime);
|
modelInfoContainer.AddChild(estimatedPrintTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
string filamentVolumeLbl = LocalizedString.Get ("Filament Volume");
|
string filamentVolumeLbl = LocalizedString.Get ("FILAMENT VOLUME");
|
||||||
string filamentVolumeLblFull = string.Format("{0}:", filamentVolumeLbl);
|
string filamentVolumeLblFull = string.Format("{0}:", filamentVolumeLbl);
|
||||||
modelInfoContainer.AddChild(new TextWidget(filamentVolumeLblFull, textColor: RGBA_Bytes.White));
|
modelInfoContainer.AddChild(new TextWidget(filamentVolumeLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 9));
|
||||||
{
|
{
|
||||||
double filamentMm3 = gcodeViewWidget.LoadedGCode.GetFilamentCubicMm(ActiveSliceSettings.Instance.FillamentDiameter);
|
double filamentMm3 = gcodeViewWidget.LoadedGCode.GetFilamentCubicMm(ActiveSliceSettings.Instance.FillamentDiameter);
|
||||||
|
|
||||||
GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.00} cm3", filamentMm3/1000), textColor: RGBA_Bytes.White, pointSize: 10);
|
GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.00} cm3", filamentMm3 / 1000), pointSize:14, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
|
//estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
|
||||||
estimatedPrintTime.Margin = new BorderDouble(3, 0, 0, 3);
|
estimatedPrintTime.Margin = new BorderDouble(0, 9, 0, 3);
|
||||||
modelInfoContainer.AddChild(estimatedPrintTime);
|
modelInfoContainer.AddChild(estimatedPrintTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
string weightLbl = LocalizedString.Get("Weight");
|
string weightLbl = LocalizedString.Get("EST. WEIGHT");
|
||||||
string weightLblFull = string.Format("{0}:", weightLbl);
|
string weightLblFull = string.Format("{0}:", weightLbl);
|
||||||
modelInfoContainer.AddChild(new TextWidget(weightLblFull, textColor: RGBA_Bytes.White));
|
modelInfoContainer.AddChild(new TextWidget(weightLblFull, pointSize: 9, textColor: ActiveTheme.Instance.SecondaryTextColor));
|
||||||
{
|
{
|
||||||
var density = 1.0;
|
var density = 1.0;
|
||||||
string filamentType = "PLA";
|
string filamentType = "PLA";
|
||||||
|
|
@ -352,13 +353,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
double filamentWeightGrams = gcodeViewWidget.LoadedGCode.GetFilamentWeightGrams(ActiveSliceSettings.Instance.FillamentDiameter, density);
|
double filamentWeightGrams = gcodeViewWidget.LoadedGCode.GetFilamentWeightGrams(ActiveSliceSettings.Instance.FillamentDiameter, density);
|
||||||
|
|
||||||
GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.00} g", filamentWeightGrams), textColor: RGBA_Bytes.White, pointSize: 10);
|
GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.00} g", filamentWeightGrams), pointSize: 14, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
|
//estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
|
||||||
estimatedPrintTime.Margin = new BorderDouble(3, 0, 0, 3);
|
estimatedPrintTime.Margin = new BorderDouble(0, 9, 0, 3);
|
||||||
modelInfoContainer.AddChild(estimatedPrintTime);
|
modelInfoContainer.AddChild(estimatedPrintTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
//modelInfoContainer.AddChild(new TextWidget("Layer Count:", textColor: RGBA_Bytes.White));
|
//modelInfoContainer.AddChild(new TextWidget("Layer Count:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
|
|
||||||
buttonPanel.AddChild(modelInfoContainer);
|
buttonPanel.AddChild(modelInfoContainer);
|
||||||
|
|
||||||
|
|
@ -373,15 +374,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
layerInfoContainer.HAnchor = HAnchor.ParentLeftRight;
|
layerInfoContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||||
layerInfoContainer.Padding = new BorderDouble(5);
|
layerInfoContainer.Padding = new BorderDouble(5);
|
||||||
|
|
||||||
layerInfoContainer.AddChild(new TextWidget("Layer Number:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Layer Number:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
layerInfoContainer.AddChild(new TextWidget("Layer Height:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Layer Height:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
layerInfoContainer.AddChild(new TextWidget("Num GCodes:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Num GCodes:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
layerInfoContainer.AddChild(new TextWidget("Filament Used:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Filament Used:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
layerInfoContainer.AddChild(new TextWidget("Weight:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Weight:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
layerInfoContainer.AddChild(new TextWidget("Print Time:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Print Time:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
layerInfoContainer.AddChild(new TextWidget("Extrude Speeds:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Extrude Speeds:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
layerInfoContainer.AddChild(new TextWidget("Move Speeds:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Move Speeds:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
layerInfoContainer.AddChild(new TextWidget("Retract Speeds:", textColor: RGBA_Bytes.White));
|
layerInfoContainer.AddChild(new TextWidget("Retract Speeds:", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
|
|
||||||
buttonPanel.AddChild(layerInfoContainer);
|
buttonPanel.AddChild(layerInfoContainer);
|
||||||
|
|
||||||
|
|
@ -397,7 +398,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
layerInfoContainer.Padding = new BorderDouble(5);
|
layerInfoContainer.Padding = new BorderDouble(5);
|
||||||
|
|
||||||
// put in a show grid check box
|
// put in a show grid check box
|
||||||
CheckBox showGrid = new CheckBox(LocalizedString.Get("Show Grid"), textColor: RGBA_Bytes.White);
|
CheckBox showGrid = new CheckBox(LocalizedString.Get("Show Grid"), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
showGrid.Checked = gcodeViewWidget.RenderGrid;
|
showGrid.Checked = gcodeViewWidget.RenderGrid;
|
||||||
showGrid.CheckedStateChanged += (sender, e) =>
|
showGrid.CheckedStateChanged += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
|
@ -406,7 +407,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
layerInfoContainer.AddChild(showGrid);
|
layerInfoContainer.AddChild(showGrid);
|
||||||
|
|
||||||
// put in a show moves checkbox
|
// put in a show moves checkbox
|
||||||
CheckBox showMoves = new CheckBox(LocalizedString.Get("Show Moves"), textColor: RGBA_Bytes.White);
|
CheckBox showMoves = new CheckBox(LocalizedString.Get("Show Moves"), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
showMoves.Checked = gcodeViewWidget.RenderMoves;
|
showMoves.Checked = gcodeViewWidget.RenderMoves;
|
||||||
showMoves.CheckedStateChanged += (sender, e) =>
|
showMoves.CheckedStateChanged += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
|
@ -415,7 +416,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
layerInfoContainer.AddChild(showMoves);
|
layerInfoContainer.AddChild(showMoves);
|
||||||
|
|
||||||
// put in a show Retractions checkbox
|
// put in a show Retractions checkbox
|
||||||
CheckBox showRetractions = new CheckBox(LocalizedString.Get("Show Retractions"), textColor: RGBA_Bytes.White);
|
CheckBox showRetractions = new CheckBox(LocalizedString.Get("Show Retractions"), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
showRetractions.Checked = gcodeViewWidget.RenderRetractions;
|
showRetractions.Checked = gcodeViewWidget.RenderRetractions;
|
||||||
showRetractions.CheckedStateChanged += (sender, e) =>
|
showRetractions.CheckedStateChanged += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
|
@ -423,7 +424,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
};
|
};
|
||||||
layerInfoContainer.AddChild(showRetractions);
|
layerInfoContainer.AddChild(showRetractions);
|
||||||
|
|
||||||
//layerInfoContainer.AddChild(new CheckBox("Show Retractions", textColor: RGBA_Bytes.White));
|
//layerInfoContainer.AddChild(new CheckBox("Show Retractions", textColor: ActiveTheme.Instance.PrimaryTextColor));
|
||||||
|
|
||||||
buttonPanel.AddChild(layerInfoContainer);
|
buttonPanel.AddChild(layerInfoContainer);
|
||||||
|
|
||||||
|
|
@ -691,11 +692,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
:base(FlowDirection.LeftToRight)
|
:base(FlowDirection.LeftToRight)
|
||||||
{
|
{
|
||||||
this.gcodeViewWidget = gcodeViewWidget;
|
this.gcodeViewWidget = gcodeViewWidget;
|
||||||
|
|
||||||
textImageButtonFactory.normalTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.hoverTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.disabledTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.pressedTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
|
|
||||||
editCurrentLayerIndex = new NumberEdit(1, pixelWidth: 40);
|
editCurrentLayerIndex = new NumberEdit(1, pixelWidth: 40);
|
||||||
editCurrentLayerIndex.VAnchor = VAnchor.ParentCenter;
|
editCurrentLayerIndex.VAnchor = VAnchor.ParentCenter;
|
||||||
|
|
@ -740,10 +741,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
this.gcodeViewWidget = gcodeViewWidget;
|
this.gcodeViewWidget = gcodeViewWidget;
|
||||||
|
|
||||||
textImageButtonFactory.normalTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.hoverTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.disabledTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.pressedTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
|
|
||||||
prevLayerButton = textImageButtonFactory.Generate("<<");
|
prevLayerButton = textImageButtonFactory.Generate("<<");
|
||||||
prevLayerButton.Click += new Button.ButtonEventHandler(prevLayer_ButtonClick);
|
prevLayerButton.Click += new Button.ButtonEventHandler(prevLayer_ButtonClick);
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
public PartPreviewBaseWidget()
|
public PartPreviewBaseWidget()
|
||||||
{
|
{
|
||||||
textImageButtonFactory.normalTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.hoverTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.disabledTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.pressedTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
|
|
||||||
whiteButtonFactory.FixedWidth = 138;
|
whiteButtonFactory.FixedWidth = 138;
|
||||||
whiteButtonFactory.normalFillColor = RGBA_Bytes.White;
|
whiteButtonFactory.normalFillColor = RGBA_Bytes.White;
|
||||||
|
|
@ -66,10 +66,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
whiteButtonFactory.hoverFillColor = new RGBA_Bytes(255, 255, 255, 200);
|
whiteButtonFactory.hoverFillColor = new RGBA_Bytes(255, 255, 255, 200);
|
||||||
|
|
||||||
expandMenuOptionFactory.FixedWidth = 138;
|
expandMenuOptionFactory.FixedWidth = 138;
|
||||||
expandMenuOptionFactory.normalTextColor = RGBA_Bytes.White;
|
expandMenuOptionFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
expandMenuOptionFactory.hoverTextColor = RGBA_Bytes.White;
|
expandMenuOptionFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
expandMenuOptionFactory.disabledTextColor = RGBA_Bytes.White;
|
expandMenuOptionFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
expandMenuOptionFactory.pressedTextColor = RGBA_Bytes.White;
|
expandMenuOptionFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
expandMenuOptionFactory.hoverFillColor = new RGBA_Bytes(255, 255, 255, 50);
|
expandMenuOptionFactory.hoverFillColor = new RGBA_Bytes(255, 255, 255, 50);
|
||||||
expandMenuOptionFactory.pressedFillColor = new RGBA_Bytes(255, 255, 255, 50);
|
expandMenuOptionFactory.pressedFillColor = new RGBA_Bytes(255, 255, 255, 50);
|
||||||
expandMenuOptionFactory.disabledFillColor = new RGBA_Bytes(255, 255, 255, 50);
|
expandMenuOptionFactory.disabledFillColor = new RGBA_Bytes(255, 255, 255, 50);
|
||||||
|
|
@ -78,18 +78,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
checkboxButtonFactory.FixedWidth = 138;
|
checkboxButtonFactory.FixedWidth = 138;
|
||||||
checkboxButtonFactory.borderWidth = 3;
|
checkboxButtonFactory.borderWidth = 3;
|
||||||
|
|
||||||
checkboxButtonFactory.normalTextColor = RGBA_Bytes.White;
|
checkboxButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
checkboxButtonFactory.normalBorderColor = new RGBA_Bytes(0, 0, 0, 0);
|
checkboxButtonFactory.normalBorderColor = new RGBA_Bytes(0, 0, 0, 0);
|
||||||
checkboxButtonFactory.normalFillColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
checkboxButtonFactory.normalFillColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||||
|
|
||||||
checkboxButtonFactory.hoverTextColor = RGBA_Bytes.White;
|
checkboxButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
checkboxButtonFactory.hoverBorderColor = new RGBA_Bytes(0, 0, 0, 50);
|
checkboxButtonFactory.hoverBorderColor = new RGBA_Bytes(0, 0, 0, 50);
|
||||||
checkboxButtonFactory.hoverFillColor = new RGBA_Bytes(0, 0, 0, 50);
|
checkboxButtonFactory.hoverFillColor = new RGBA_Bytes(0, 0, 0, 50);
|
||||||
|
|
||||||
checkboxButtonFactory.pressedTextColor = RGBA_Bytes.White;
|
checkboxButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
checkboxButtonFactory.pressedBorderColor = new RGBA_Bytes(0, 0, 0, 50);
|
checkboxButtonFactory.pressedBorderColor = new RGBA_Bytes(0, 0, 0, 50);
|
||||||
|
|
||||||
checkboxButtonFactory.disabledTextColor = RGBA_Bytes.White;
|
checkboxButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
|
|
||||||
BackgroundColor = RGBA_Bytes.White;
|
BackgroundColor = RGBA_Bytes.White;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1020,17 +1020,17 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
PartInfoOptionContainer.Margin = new BorderDouble(8, 3);
|
PartInfoOptionContainer.Margin = new BorderDouble(8, 3);
|
||||||
string sizeInfoLbl = LocalizedString.Get("Size");
|
string sizeInfoLbl = LocalizedString.Get("Size");
|
||||||
string sizeInfoLblFull = "{0}:".FormatWith(sizeInfoLbl);
|
string sizeInfoLblFull = "{0}:".FormatWith(sizeInfoLbl);
|
||||||
TextWidget sizeInfo = new TextWidget(sizeInfoLblFull, textColor: RGBA_Bytes.White);
|
TextWidget sizeInfo = new TextWidget(sizeInfoLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
PartInfoOptionContainer.AddChild(sizeInfo);
|
PartInfoOptionContainer.AddChild(sizeInfo);
|
||||||
TextWidget xSizeInfo = new TextWidget(" x 10.1", pointSize: 10, textColor: RGBA_Bytes.White);
|
TextWidget xSizeInfo = new TextWidget(" x 10.1", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
xSizeInfo.AutoExpandBoundsToText = true;
|
xSizeInfo.AutoExpandBoundsToText = true;
|
||||||
PartInfoOptionContainer.AddChild(xSizeInfo);
|
PartInfoOptionContainer.AddChild(xSizeInfo);
|
||||||
|
|
||||||
TextWidget ySizeInfo = new TextWidget(" y 10.1", pointSize: 10, textColor: RGBA_Bytes.White);
|
TextWidget ySizeInfo = new TextWidget(" y 10.1", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
ySizeInfo.AutoExpandBoundsToText = true;
|
ySizeInfo.AutoExpandBoundsToText = true;
|
||||||
PartInfoOptionContainer.AddChild(ySizeInfo);
|
PartInfoOptionContainer.AddChild(ySizeInfo);
|
||||||
|
|
||||||
TextWidget zSizeInfo = new TextWidget(" z 100.1", pointSize: 10, textColor: RGBA_Bytes.White);
|
TextWidget zSizeInfo = new TextWidget(" z 100.1", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
zSizeInfo.AutoExpandBoundsToText = true;
|
zSizeInfo.AutoExpandBoundsToText = true;
|
||||||
PartInfoOptionContainer.AddChild(zSizeInfo);
|
PartInfoOptionContainer.AddChild(zSizeInfo);
|
||||||
}
|
}
|
||||||
|
|
@ -1114,7 +1114,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
string scaleRatioLblTxt = LocalizedString.Get("Ratio");
|
string scaleRatioLblTxt = LocalizedString.Get("Ratio");
|
||||||
string scaleRatioLblTxtFull = "{0}:".FormatWith(scaleRatioLblTxt);
|
string scaleRatioLblTxtFull = "{0}:".FormatWith(scaleRatioLblTxt);
|
||||||
TextWidget scaleRatioLabel = new TextWidget(scaleRatioLblTxtFull, textColor: RGBA_Bytes.White);
|
TextWidget scaleRatioLabel = new TextWidget(scaleRatioLblTxtFull, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
scaleRatioLabel.VAnchor = VAnchor.ParentCenter;
|
scaleRatioLabel.VAnchor = VAnchor.ParentCenter;
|
||||||
scaleRatioContainer.AddChild(scaleRatioLabel);
|
scaleRatioContainer.AddChild(scaleRatioLabel);
|
||||||
|
|
||||||
|
|
@ -1256,7 +1256,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
string degreesLabelTxt = LocalizedString.Get("Degrees");
|
string degreesLabelTxt = LocalizedString.Get("Degrees");
|
||||||
string degreesLabelTxtFull = "{0}:".FormatWith(degreesLabelTxt);
|
string degreesLabelTxtFull = "{0}:".FormatWith(degreesLabelTxt);
|
||||||
TextWidget degreesLabel = new TextWidget(degreesLabelTxt, textColor: RGBA_Bytes.White);
|
TextWidget degreesLabel = new TextWidget(degreesLabelTxt, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
degreesContainer.AddChild(degreesLabel);
|
degreesContainer.AddChild(degreesLabel);
|
||||||
degreesContainer.AddChild(horizontalSpacer);
|
degreesContainer.AddChild(horizontalSpacer);
|
||||||
|
|
||||||
|
|
@ -1271,7 +1271,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
rotateButtonContainer.HAnchor = HAnchor.ParentLeftRight;
|
rotateButtonContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||||
|
|
||||||
Button rotateXButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png");
|
Button rotateXButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png");
|
||||||
TextWidget centeredX = new TextWidget("X", pointSize: 10, textColor: RGBA_Bytes.White); centeredX.Margin = new BorderDouble(3, 0, 0, 0); centeredX.AnchorCenter(); rotateXButton.AddChild(centeredX);
|
TextWidget centeredX = new TextWidget("X", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); centeredX.Margin = new BorderDouble(3, 0, 0, 0); centeredX.AnchorCenter(); rotateXButton.AddChild(centeredX);
|
||||||
rotateButtonContainer.AddChild(rotateXButton);
|
rotateButtonContainer.AddChild(rotateXButton);
|
||||||
rotateControls.Add(rotateXButton);
|
rotateControls.Add(rotateXButton);
|
||||||
rotateXButton.Click += (object sender, MouseEventArgs mouseEvent) =>
|
rotateXButton.Click += (object sender, MouseEventArgs mouseEvent) =>
|
||||||
|
|
@ -1295,7 +1295,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
Button rotateYButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png");
|
Button rotateYButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png");
|
||||||
TextWidget centeredY = new TextWidget("Y", pointSize: 10, textColor: RGBA_Bytes.White); centeredY.Margin = new BorderDouble(3, 0, 0, 0); centeredY.AnchorCenter(); rotateYButton.AddChild(centeredY);
|
TextWidget centeredY = new TextWidget("Y", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); centeredY.Margin = new BorderDouble(3, 0, 0, 0); centeredY.AnchorCenter(); rotateYButton.AddChild(centeredY);
|
||||||
rotateButtonContainer.AddChild(rotateYButton);
|
rotateButtonContainer.AddChild(rotateYButton);
|
||||||
rotateControls.Add(rotateYButton);
|
rotateControls.Add(rotateYButton);
|
||||||
rotateYButton.Click += (object sender, MouseEventArgs mouseEvent) =>
|
rotateYButton.Click += (object sender, MouseEventArgs mouseEvent) =>
|
||||||
|
|
@ -1319,7 +1319,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
Button rotateZButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png");
|
Button rotateZButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png");
|
||||||
TextWidget centeredZ = new TextWidget("Z", pointSize: 10, textColor: RGBA_Bytes.White); centeredZ.Margin = new BorderDouble(3, 0, 0, 0); centeredZ.AnchorCenter(); rotateZButton.AddChild(centeredZ);
|
TextWidget centeredZ = new TextWidget("Z", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); centeredZ.Margin = new BorderDouble(3, 0, 0, 0); centeredZ.AnchorCenter(); rotateZButton.AddChild(centeredZ);
|
||||||
rotateButtonContainer.AddChild(rotateZButton);
|
rotateButtonContainer.AddChild(rotateZButton);
|
||||||
rotateControls.Add(rotateZButton);
|
rotateControls.Add(rotateZButton);
|
||||||
rotateZButton.Click += (object sender, MouseEventArgs mouseEvent) =>
|
rotateZButton.Click += (object sender, MouseEventArgs mouseEvent) =>
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ namespace MatterHackers.MatterControl.PrintQueue
|
||||||
partLabel.TextColor = WidgetTextColor;
|
partLabel.TextColor = WidgetTextColor;
|
||||||
partLabel.MinimumSize = new Vector2(1, 16);
|
partLabel.MinimumSize = new Vector2(1, 16);
|
||||||
|
|
||||||
string partStatusLblTxt = LocalizedString.Get ("Status");
|
string partStatusLblTxt = LocalizedString.Get ("STATUS");
|
||||||
string partStatusLblTxtTest = LocalizedString.Get ("Queued to Print");
|
string partStatusLblTxtTest = LocalizedString.Get ("Queued to Print");
|
||||||
string partStatusLblTxtFull = "{0}: {1}".FormatWith(partStatusLblTxt,partStatusLblTxtTest);
|
string partStatusLblTxtFull = "{0}: {1}".FormatWith(partStatusLblTxt,partStatusLblTxtTest);
|
||||||
|
|
||||||
|
|
@ -438,8 +438,8 @@ namespace MatterHackers.MatterControl.PrintQueue
|
||||||
{
|
{
|
||||||
//Set background and text color to new theme
|
//Set background and text color to new theme
|
||||||
this.BackgroundColor = ActiveTheme.Instance.PrimaryAccentColor;
|
this.BackgroundColor = ActiveTheme.Instance.PrimaryAccentColor;
|
||||||
this.partLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
this.partLabel.TextColor = RGBA_Bytes.White;
|
||||||
this.partStatus.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
this.partStatus.TextColor = RGBA_Bytes.White;
|
||||||
this.Invalidate();
|
this.Invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -462,7 +462,7 @@ namespace MatterHackers.MatterControl.PrintQueue
|
||||||
//RoundedRect rectBorder = new RoundedRect(Bounds, 0);
|
//RoundedRect rectBorder = new RoundedRect(Bounds, 0);
|
||||||
|
|
||||||
this.BackgroundColor = ActiveTheme.Instance.SecondaryAccentColor;
|
this.BackgroundColor = ActiveTheme.Instance.SecondaryAccentColor;
|
||||||
SetTextColors(ActiveTheme.Instance.PrimaryTextColor);
|
SetTextColors(RGBA_Bytes.White);
|
||||||
|
|
||||||
//graphics2D.Render(new Stroke(rectBorder, 4), ActiveTheme.Instance.SecondaryAccentColor);
|
//graphics2D.Render(new Stroke(rectBorder, 4), ActiveTheme.Instance.SecondaryAccentColor);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,11 @@ namespace MatterHackers.MatterControl.PrintQueue
|
||||||
public QueueControlsWidget()
|
public QueueControlsWidget()
|
||||||
{
|
{
|
||||||
SetDisplayAttributes();
|
SetDisplayAttributes();
|
||||||
|
|
||||||
textImageButtonFactory.normalTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.hoverTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.disabledTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.pressedTextColor = RGBA_Bytes.White;
|
textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
textImageButtonFactory.borderWidth = 0;
|
textImageButtonFactory.borderWidth = 0;
|
||||||
|
|
||||||
FlowLayoutWidget allControls = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
FlowLayoutWidget allControls = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@ namespace MatterHackers.MatterControl
|
||||||
FlowLayoutWidget leftToRight = new FlowLayoutWidget();
|
FlowLayoutWidget leftToRight = new FlowLayoutWidget();
|
||||||
leftToRight.Padding = new BorderDouble(3, 0, 0, 5);
|
leftToRight.Padding = new BorderDouble(3, 0, 0, 5);
|
||||||
|
|
||||||
TextWidget fanSpeedDescription = new TextWidget(LocalizedString.Get("Fan Speed:"), textColor: RGBA_Bytes.White);
|
TextWidget fanSpeedDescription = new TextWidget(LocalizedString.Get("Fan Speed:"), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
fanSpeedDescription.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
fanSpeedDescription.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
||||||
leftToRight.AddChild(fanSpeedDescription);
|
leftToRight.AddChild(fanSpeedDescription);
|
||||||
|
|
||||||
|
|
@ -392,7 +392,7 @@ namespace MatterHackers.MatterControl
|
||||||
GuiWidget topLine = new GuiWidget(10, 1);
|
GuiWidget topLine = new GuiWidget(10, 1);
|
||||||
topLine.Margin = new BorderDouble(0, 5);
|
topLine.Margin = new BorderDouble(0, 5);
|
||||||
topLine.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
topLine.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||||
topLine.BackgroundColor = RGBA_Bytes.White;
|
topLine.BackgroundColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
return topLine;
|
return topLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -425,7 +425,7 @@ namespace MatterHackers.MatterControl
|
||||||
feedRateLeftToRight = new FlowLayoutWidget();
|
feedRateLeftToRight = new FlowLayoutWidget();
|
||||||
|
|
||||||
feedRateDescription = new TextWidget(LocalizedString.Get("Speed Multiplier"));
|
feedRateDescription = new TextWidget(LocalizedString.Get("Speed Multiplier"));
|
||||||
feedRateDescription.TextColor = RGBA_Bytes.White;
|
feedRateDescription.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
feedRateLeftToRight.AddChild(feedRateDescription);
|
feedRateLeftToRight.AddChild(feedRateDescription);
|
||||||
feedRateRatioSlider = new Slider(new Vector2(), 300, minFeedRateRatio, maxFeedRateRatio);
|
feedRateRatioSlider = new Slider(new Vector2(), 300, minFeedRateRatio, maxFeedRateRatio);
|
||||||
feedRateRatioSlider.Margin = new BorderDouble(5, 0);
|
feedRateRatioSlider.Margin = new BorderDouble(5, 0);
|
||||||
|
|
@ -456,7 +456,7 @@ namespace MatterHackers.MatterControl
|
||||||
FlowLayoutWidget leftToRight = new FlowLayoutWidget();
|
FlowLayoutWidget leftToRight = new FlowLayoutWidget();
|
||||||
|
|
||||||
extrusionDescription = new TextWidget(LocalizedString.Get("Extrusion Multiplier"));
|
extrusionDescription = new TextWidget(LocalizedString.Get("Extrusion Multiplier"));
|
||||||
extrusionDescription.TextColor = RGBA_Bytes.White;
|
extrusionDescription.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
leftToRight.AddChild(extrusionDescription);
|
leftToRight.AddChild(extrusionDescription);
|
||||||
extrusionRatioSlider = new Slider(new Vector2(), 300, minExtrutionRatio, maxExtrusionRatio);
|
extrusionRatioSlider = new Slider(new Vector2(), 300, minExtrutionRatio, maxExtrusionRatio);
|
||||||
extrusionRatioSlider.Margin = new BorderDouble(5, 0);
|
extrusionRatioSlider.Margin = new BorderDouble(5, 0);
|
||||||
|
|
|
||||||
|
|
@ -1407,3 +1407,51 @@ Translated:Not connected. Press 'Connect' to enable printing.
|
||||||
English:Loading Parts
|
English:Loading Parts
|
||||||
Translated:Loading Parts
|
Translated:Loading Parts
|
||||||
|
|
||||||
|
English:CONNECT
|
||||||
|
Translated:CONNECT
|
||||||
|
|
||||||
|
English:DISCONNECT
|
||||||
|
Translated:DISCONNECT
|
||||||
|
|
||||||
|
English:OPTIONS
|
||||||
|
Translated:OPTIONS
|
||||||
|
|
||||||
|
English:QUEUE
|
||||||
|
Translated:QUEUE
|
||||||
|
|
||||||
|
English:STATUS
|
||||||
|
Translated:STATUS
|
||||||
|
|
||||||
|
English:CONTROLS
|
||||||
|
Translated:CONTROLS
|
||||||
|
|
||||||
|
English:SLICE SETTINGS
|
||||||
|
Translated:SLICE SETTINGS
|
||||||
|
|
||||||
|
English:CONFIGURATION
|
||||||
|
Translated:CONFIGURATION
|
||||||
|
|
||||||
|
English:MODEL
|
||||||
|
Translated:MODEL
|
||||||
|
|
||||||
|
English:LAYER
|
||||||
|
Translated:LAYER
|
||||||
|
|
||||||
|
English:DISPLAY
|
||||||
|
Translated:DISPLAY
|
||||||
|
|
||||||
|
English:PRINT TIME
|
||||||
|
Translated:PRINT TIME
|
||||||
|
|
||||||
|
English:FILAMENT LENGTH
|
||||||
|
Translated:FILAMENT LENGTH
|
||||||
|
|
||||||
|
English:FILAMENT VOLUME
|
||||||
|
Translated:FILAMENT VOLUME
|
||||||
|
|
||||||
|
English:WEIGHT
|
||||||
|
Translated:WEIGHT
|
||||||
|
|
||||||
|
English:EST. WEIGHT
|
||||||
|
Translated:EST. WEIGHT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue