Use theme font definitions to track usage

This commit is contained in:
John Lewin 2017-10-22 19:53:48 -07:00
parent 6c21f79ef6
commit 3bfa2e3bd3
5 changed files with 16 additions and 11 deletions

View file

@ -51,10 +51,12 @@ namespace MatterHackers.MatterControl
private readonly int fizedHeightA = (int)(25 * GuiWidget.DeviceScale + .5);
private readonly double fizedHeightB = 34 * GuiWidget.DeviceScale;
private readonly int fontSize10 = 10;
private readonly int fontSize11 = 11;
private readonly int fontSize12 = 12;
private readonly int fontSize14 = 14;
public int FontSize7 { get; } = 7;
public int FontSize9 { get; } = 9;
public int FontSize10 { get; } = 10;
public int FontSize11 { get; } = 11;
public int FontSize12 { get; } = 12;
public int FontSize14 { get; } = 14;
private int shortButtonHeight = 25;
private int sideBarButtonWidth;
@ -340,13 +342,13 @@ namespace MatterHackers.MatterControl
this.LinkButtonFactory = new LinkButtonFactory()
{
fontSize = fontSize11,
fontSize = FontSize11,
textColor = theme.PrimaryTextColor
};
this.HelpLinkFactory = new LinkButtonFactory()
{
fontSize = fontSize10,
fontSize = FontSize10,
textColor = theme.SecondaryAccentColor
};
this.PrimaryTabFillColor = new RGBA_Bytes(RGBA_Bytes.White, ActiveTheme.Instance.IsDarkTheme ? 20 : 60);
@ -400,7 +402,7 @@ namespace MatterHackers.MatterControl
tabControl.TabBar.BorderColor = RGBA_Bytes.Transparent; // theme.SecondaryTextColor;
tabControl.TabBar.Margin = 0;
tabControl.TabBar.Padding = 0;
tabControl.TextPointSize = fontSize12;
tabControl.TextPointSize = FontSize12;
return tabControl;
}

View file

@ -42,7 +42,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
private EventHandler unregisterEvents;
public GCodeDetailsView(GCodeDetails gcodeDetails, int dataPointSize = 14, int headingPointSize = 11)
public GCodeDetailsView(GCodeDetails gcodeDetails, int dataPointSize, int headingPointSize)
: base(FlowDirection.TopToBottom)
{
var margin = new BorderDouble(0, 9, 0, 3);

View file

@ -100,7 +100,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
new SectionWidget(
"Details".Localize(),
ActiveTheme.Instance.PrimaryTextColor,
new GCodeDetailsView(new GCodeDetails(printer, printer.Bed.LoadedGCode), 12, 9)
new GCodeDetailsView(new GCodeDetails(printer, printer.Bed.LoadedGCode), theme.FontSize12, theme.FontSize9)
{
HAnchor = HAnchor.Fit,
Margin = new BorderDouble(bottom: 3)
@ -110,7 +110,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
new SectionWidget(
"Speeds".Localize(),
ActiveTheme.Instance.PrimaryTextColor,
new SpeedsLegend(sceneContext.LoadedGCode, theme, pointSize: 12)
new SpeedsLegend(sceneContext.LoadedGCode, theme, pointSize: theme.FontSize12)
{
HAnchor = HAnchor.Stretch,
Visible = sceneContext.RendererOptions.RenderSpeeds,

View file

@ -4639,3 +4639,6 @@ Translated:Update In Progress: {0}
English:Paint Material
Translated:Paint Material
English:Folders
Translated:Folders

@ -1 +1 @@
Subproject commit 4011d93a02003dcaf97a521b4c15ad98aa57a1f0
Subproject commit d958390f8726a2b082aab38d7ccf7809ea520f5f