Mesen-X/GUI.NET/Controls/BaseControl.cs

57 lines
974 B
C#
Raw Normal View History

2016-12-11 14:25:29 -05:00
using System.Windows.Forms;
using System.Drawing;
using Mesen.GUI;
using System;
2016-12-11 14:25:29 -05:00
namespace Mesen.GUI.Controls
{
public class BaseControl : UserControl
{
public static float DefaultFontSize = Program.IsMono ? 10 : 12;
2016-12-11 14:25:29 -05:00
public static string MonospaceFontFamily
{
get
{
if(Program.IsMono) {
return "DroidSansMono";
2016-12-11 14:25:29 -05:00
} else {
return "Consolas";
}
}
}
public static Bitmap DownArrow
{
get
{
if(!Program.IsMono && Environment.OSVersion.Version >= new Version(6, 2)) {
return Properties.Resources.DownArrowWin10;
} else {
return Properties.Resources.DownArrow;
}
}
}
2016-12-11 14:25:29 -05:00
public new AutoScaleMode AutoScaleMode
{
set {
if(Program.IsMono) {
2017-09-16 22:02:05 -04:00
base.AutoScaleMode = AutoScaleMode.None;
2016-12-11 14:25:29 -05:00
} else {
base.AutoScaleMode = value;
}
}
}
2017-09-17 00:54:30 -04:00
public new SizeF AutoScaleDimensions
{
set
{
if(!Program.IsMono) {
base.AutoScaleDimensions = value;
}
}
}
2016-12-11 14:25:29 -05:00
}
}