Cache `ToolStripRenderer` used by `FormBase.FixBackColorOnControls`
This commit is contained in:
parent
322ed164bf
commit
d5bf542a3c
|
@ -26,11 +26,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (control.BackColor == SystemColors.Control) control.BackColor = Color.WhiteSmoke;
|
if (control.BackColor == SystemColors.Control) control.BackColor = Color.WhiteSmoke;
|
||||||
foreach (Control c1 in control.Controls)
|
foreach (Control c1 in control.Controls)
|
||||||
{
|
{
|
||||||
if (c1 is ToolStrip ts) ts.Renderer = new ToolStripProfessionalRenderer(new LinuxColorTable());
|
if (c1 is ToolStrip ts) ts.Renderer = GlobalToolStripRenderer;
|
||||||
else FixBackColorOnControls(c1);
|
else FixBackColorOnControls(c1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static readonly ToolStripRenderer GlobalToolStripRenderer = new ToolStripProfessionalRenderer(new LinuxColorTable());
|
||||||
|
|
||||||
private string? _windowTitleStatic;
|
private string? _windowTitleStatic;
|
||||||
|
|
||||||
public virtual bool BlocksInputWhenFocused
|
public virtual bool BlocksInputWhenFocused
|
||||||
|
|
Loading…
Reference in New Issue