More DPI
This commit is contained in:
parent
7799698754
commit
430040886e
@ -51,22 +51,36 @@ namespace BismNormalizer.TabularCompare.UI
|
|||||||
//DPI
|
//DPI
|
||||||
float dpiScaleFactorFudged = _dpiScaleFactor * HighDPIUtils.PrimaryFudgeFactor;
|
float dpiScaleFactorFudged = _dpiScaleFactor * HighDPIUtils.PrimaryFudgeFactor;
|
||||||
|
|
||||||
this.Scale(new SizeF(dpiScaleFactorFudged * 0.44f, dpiScaleFactorFudged * 0.38f));
|
if (Settings.Default.OptionHighDpiLocal)
|
||||||
this.Width = Convert.ToInt32(this.Width * dpiScaleFactorFudged * 0.8f);
|
|
||||||
foreach (Control control in HighDPIUtils.GetChildInControl(this))
|
|
||||||
{
|
{
|
||||||
if (control is Button)
|
this.Scale(new SizeF(dpiScaleFactorFudged * 0.44f, dpiScaleFactorFudged * 0.38f));
|
||||||
|
this.Width = Convert.ToInt32(this.Width * dpiScaleFactorFudged * 0.8f);
|
||||||
|
foreach (Control control in HighDPIUtils.GetChildInControl(this))
|
||||||
{
|
{
|
||||||
control.Font = new Font(control.Font.FontFamily,
|
if (control is Button)
|
||||||
control.Font.Size * dpiScaleFactorFudged * 1.1f * HighDPIUtils.PrimaryFudgeFactor,
|
{
|
||||||
control.Font.Style);
|
control.Font = new Font(control.Font.FontFamily,
|
||||||
|
control.Font.Size * dpiScaleFactorFudged * 1.1f * HighDPIUtils.PrimaryFudgeFactor,
|
||||||
|
control.Font.Style);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
control.Font = new Font(control.Font.FontFamily,
|
||||||
|
//cbw todo check * 1.4f works on remote desktop setting
|
||||||
|
control.Font.Size * dpiScaleFactorFudged * 1.4f * HighDPIUtils.PrimaryFudgeFactor,
|
||||||
|
control.Font.Style);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Scale(new SizeF(dpiScaleFactorFudged * 0.44f, dpiScaleFactorFudged * 0.38f));
|
||||||
|
this.Width = Convert.ToInt32(this.Width * dpiScaleFactorFudged * 0.6f);
|
||||||
|
foreach (Control control in HighDPIUtils.GetChildInControl(this))
|
||||||
{
|
{
|
||||||
control.Font = new Font(control.Font.FontFamily,
|
control.Font = new Font(control.Font.FontFamily,
|
||||||
//cbw todo check * 1.4f works on remote desktop setting
|
control.Font.Size * dpiScaleFactorFudged * HighDPIUtils.PrimaryFudgeFactor,
|
||||||
control.Font.Size * dpiScaleFactorFudged * 1.4f * HighDPIUtils.PrimaryFudgeFactor,
|
control.Font.Style);
|
||||||
control.Font.Style);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,23 +56,38 @@ namespace BismNormalizer.TabularCompare.UI
|
|||||||
{
|
{
|
||||||
//DPI
|
//DPI
|
||||||
float dpiScaleFactorFudged = _dpiScaleFactor * HighDPIUtils.PrimaryFudgeFactor;
|
float dpiScaleFactorFudged = _dpiScaleFactor * HighDPIUtils.PrimaryFudgeFactor;
|
||||||
this.Scale(new SizeF(dpiScaleFactorFudged * 0.44f, dpiScaleFactorFudged * 0.35f));
|
|
||||||
this.Width = Convert.ToInt32(this.Width * dpiScaleFactorFudged * 0.6f);
|
|
||||||
|
|
||||||
foreach (Control control in HighDPIUtils.GetChildInControl(this))
|
if (Settings.Default.OptionHighDpiLocal)
|
||||||
{
|
{
|
||||||
if (control is Button)
|
this.Scale(new SizeF(dpiScaleFactorFudged * 0.44f, dpiScaleFactorFudged * 0.35f));
|
||||||
|
this.Width = Convert.ToInt32(this.Width * dpiScaleFactorFudged * 0.6f);
|
||||||
|
|
||||||
|
foreach (Control control in HighDPIUtils.GetChildInControl(this))
|
||||||
{
|
{
|
||||||
control.Font = new Font(control.Font.FontFamily,
|
if (control is Button)
|
||||||
control.Font.Size * dpiScaleFactorFudged * 1.1f * HighDPIUtils.PrimaryFudgeFactor,
|
{
|
||||||
control.Font.Style);
|
control.Font = new Font(control.Font.FontFamily,
|
||||||
|
control.Font.Size * dpiScaleFactorFudged * 1.1f * HighDPIUtils.PrimaryFudgeFactor,
|
||||||
|
control.Font.Style);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
control.Font = new Font(control.Font.FontFamily,
|
||||||
|
//cbw todo check * 1.4f works on remote desktop setting
|
||||||
|
control.Font.Size * dpiScaleFactorFudged * 1.4f * HighDPIUtils.PrimaryFudgeFactor,
|
||||||
|
control.Font.Style);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Scale(new SizeF(dpiScaleFactorFudged * 0.44f, dpiScaleFactorFudged * 0.38f));
|
||||||
|
this.Width = Convert.ToInt32(this.Width * dpiScaleFactorFudged * 0.6f);
|
||||||
|
foreach (Control control in HighDPIUtils.GetChildInControl(this))
|
||||||
{
|
{
|
||||||
control.Font = new Font(control.Font.FontFamily,
|
control.Font = new Font(control.Font.FontFamily,
|
||||||
//cbw todo check * 1.4f works on remote desktop setting
|
control.Font.Size * dpiScaleFactorFudged * HighDPIUtils.PrimaryFudgeFactor,
|
||||||
control.Font.Size * dpiScaleFactorFudged * 1.4f * HighDPIUtils.PrimaryFudgeFactor,
|
control.Font.Style);
|
||||||
control.Font.Style);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user