Skip to content

Commit

Permalink
Upstream: Fix colors for submenu items
Browse files Browse the repository at this point in the history
  • Loading branch information
hellzerg committed Nov 14, 2021
1 parent 63de861 commit 4f64659
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Mint/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ private void BuildLauncherMenu()
}
}

//ToolStripMenuItem pi = new ToolStripMenuItem("Servers");
//ToolStripMenuItem si = new ToolStripMenuItem("Windows VPS");
//ToolStripMenuItem si2 = new ToolStripMenuItem("Linux SSH");
//pi.DropDownItems.Add(si);
//pi.DropDownItems.Add(si2);
//launcherMenu.Items.Add(pi);

launcherMenu.Items.Add("Exit");

foreach (ToolStripMenuItem y in launcherMenu.Items)
Expand Down
25 changes: 25 additions & 0 deletions Mint/ToolStripRendererMaterial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,35 @@ internal ToolStripRendererMaterial() : base(new ColorsMaterial())
{

}


protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
{
var tsMenuItem = e.Item as ToolStripMenuItem;
if (tsMenuItem != null)
e.TextColor = Color.GhostWhite;
base.OnRenderItemText(e);
}

protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
{
var tsMenuItem = e.Item as ToolStripMenuItem;
if (tsMenuItem != null)
e.ArrowColor = Color.GhostWhite;
base.OnRenderArrow(e);
}
}

internal class ColorsMaterial : ProfessionalColorTable
{
public override Color ToolStripDropDownBackground
{
get
{
return Options.BackgroundColor;
}
}

public override Color ImageMarginGradientBegin
{
get
Expand Down

0 comments on commit 4f64659

Please sign in to comment.