Use theme default font size

This commit is contained in:
John Lewin 2018-01-12 14:05:04 -08:00
parent 13cc147dfe
commit 1a91cbc5c8
8 changed files with 23 additions and 17 deletions

View file

@ -40,10 +40,9 @@ namespace MatterHackers.MatterControl.PrinterControls
// label
buttonRow.AddChild(
new TextWidget("")
new TextWidget("", textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize)
{
AutoExpandBoundsToText = true,
TextColor = ActiveTheme.Instance.PrimaryTextColor,
VAnchor = VAnchor.Center,
Text = "Software Print Leveling".Localize()
});

View file

@ -87,7 +87,8 @@ namespace MatterHackers.MatterControl
primaryTabControl,
scrollable,
theme,
hasClose: false)
hasClose: false,
pointSize: theme.DefaultFontSize)
{
Name = section.Name + " Tab",
InactiveTabColor = Color.Transparent,

View file

@ -213,7 +213,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
content,
theme,
hasClose: kvp.Value is ConfigurePrinterWidget,
pointSize: theme.FontSize11)
pointSize: theme.DefaultFontSize)
{
Name = tabTitle + " Tab",
InactiveTabColor = Color.Transparent,

View file

@ -41,7 +41,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
{
private MoveButtonFactory buttonFactory = new MoveButtonFactory()
{
FontSize = 13,
FontSize = ApplicationController.Instance.Theme.DefaultFontSize,
};
public ZAxisControls(PrinterConfig printer, ThemeConfig theme, bool smallScreen) :

View file

@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl
};
this.AddChild(headerRow);
filterOutput = new CheckBox("Filter Output".Localize())
filterOutput = new CheckBox("Filter Output".Localize(), textSize: theme.DefaultFontSize)
{
TextColor = ActiveTheme.Instance.PrimaryTextColor,
VAnchor = VAnchor.Bottom,
@ -85,7 +85,7 @@ namespace MatterHackers.MatterControl
};
headerRow.AddChild(filterOutput);
autoUppercase = new CheckBox("Auto Uppercase".Localize())
autoUppercase = new CheckBox("Auto Uppercase".Localize(), textSize: theme.DefaultFontSize)
{
Margin = new BorderDouble(left: 25),
Checked = UserSettings.Instance.Fields.GetBool(UserSettingsKey.TerminalAutoUppercase, true),

View file

@ -32,7 +32,6 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using MatterHackers.Agg;
using MatterHackers.Agg.ImageProcessing;
using MatterHackers.Agg.Platform;
using MatterHackers.Agg.UI;
using MatterHackers.Agg.VertexSource;
@ -59,7 +58,10 @@ namespace MatterHackers.MatterControl
private MoveButton zPlusControl;
private MoveButton zMinusControl;
private MoveButtonFactory moveButtonFactory = new MoveButtonFactory();
private MoveButtonFactory moveButtonFactory = new MoveButtonFactory()
{
FontSize = ApplicationController.Instance.Theme.DefaultFontSize
};
private PrinterConfig printer;
public JogControls(PrinterConfig printer, XYZColors colors)
@ -556,7 +558,10 @@ namespace MatterHackers.MatterControl
{
FlowLayoutWidget zButtons = new FlowLayoutWidget(FlowDirection.TopToBottom);
{
MoveButtonFactory moveButtonFactory = new MoveButtonFactory();
var moveButtonFactory = new MoveButtonFactory()
{
FontSize = ApplicationController.Instance.Theme.DefaultFontSize
};
moveButtonFactory.Colors.Fill.Normal = color;
zPlusControl = CreateMoveButton(printer, "Z+", PrinterConnection.Axis.Z, printer.Settings.ZSpeed(), levelingButtons, moveButtonFactory);
@ -805,22 +810,22 @@ namespace MatterHackers.MatterControl
{
//Create the multi-state button view
var buttonViewStates = new ButtonViewStates(
new MoveButtonWidget(label, Colors.Text.Normal)
new MoveButtonWidget(label, Colors.Text.Normal, this.FontSize)
{
BackgroundColor = Colors.Fill.Normal,
BorderWidth = this.BorderWidth
},
new MoveButtonWidget(label, Colors.Text.Hover)
new MoveButtonWidget(label, Colors.Text.Hover, this.FontSize)
{
BackgroundColor = Colors.Fill.Hover,
BorderWidth = this.BorderWidth
},
new MoveButtonWidget(label, Colors.Text.Pressed)
new MoveButtonWidget(label, Colors.Text.Pressed, this.FontSize)
{
BackgroundColor = Colors.Fill.Pressed,
BorderWidth = this.BorderWidth
},
new MoveButtonWidget(label, Colors.Text.Disabled)
new MoveButtonWidget(label, Colors.Text.Disabled, this.FontSize)
{
BackgroundColor = Colors.Fill.Disabled,
BorderWidth = this.BorderWidth

View file

@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
Margin = new BorderDouble(top: 8),
VAnchor = VAnchor.Stretch,
HAnchor = HAnchor.Stretch,
MinimumSize = new Vector2(200, 200)
MinimumSize = new Vector2(200, 200),
};
primaryTabControl.TabBar.BackgroundColor = theme.ActiveTabBarBackground;
@ -130,7 +130,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
primaryTabControl,
content,
theme,
hasClose: false)
hasClose: false,
pointSize: theme.DefaultFontSize)
{
Name = category.Name + " Tab",
InactiveTabColor = Color.Transparent,

@ -1 +1 @@
Subproject commit f3461d6760b2f460c25d6ef924d5f87f83835876
Subproject commit 62ffc915f217c8a2232810fb4f567f9b4b1009f3