-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from GenieClient/Dev-4-0-2-6
This has been heavily tested on the Test Build and has been stable and unchanged for 2 weeks without incident. Thread cut was declared 12/3 and testing has continued.
- Loading branch information
Showing
36 changed files
with
3,430 additions
and
3,040 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
using System; | ||
using System.Drawing; | ||
using System.Windows.Forms; | ||
|
||
|
||
namespace GenieClient.Forms.Components | ||
{ | ||
internal class MenuRenderer : ToolStripProfessionalRenderer | ||
{ | ||
private Genie.Globals.Presets Presets; | ||
public MenuRenderer(Genie.Globals.Presets PresetList) : base(new MenuColors(PresetList)) | ||
{ | ||
Presets = PresetList; | ||
} | ||
|
||
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) | ||
{ | ||
base.OnRenderMenuItemBackground(e); | ||
e.Item.ForeColor = Presets["ui.menu"].FgColor; | ||
e.Item.BackColor = Presets["ui.menu"].BgColor; | ||
} | ||
|
||
protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) | ||
{ | ||
base.OnRenderToolStripBackground(e); | ||
e.ToolStrip.ForeColor = Presets["ui.menu"].FgColor; | ||
e.ToolStrip.BackColor = Presets["ui.menu"].BgColor; | ||
} | ||
} | ||
|
||
internal class MenuColors : ProfessionalColorTable | ||
{ | ||
Genie.Globals.Presets Presets; | ||
public MenuColors(Genie.Globals.Presets PresetList) | ||
{ | ||
Presets = PresetList; | ||
} | ||
|
||
public override Color MenuItemPressedGradientBegin | ||
{ | ||
get { return Presets["ui.menu.highlight"].FgColor; } | ||
} | ||
|
||
public override Color MenuItemPressedGradientMiddle | ||
{ | ||
get { return Color.Transparent; } | ||
} | ||
public override Color MenuItemPressedGradientEnd | ||
{ | ||
get { return Color.Transparent; } | ||
} | ||
|
||
public override Color MenuItemSelectedGradientBegin | ||
{ | ||
get { return Color.Transparent; } | ||
} | ||
|
||
public override Color MenuItemSelectedGradientEnd | ||
{ | ||
get { return Presets["ui.menu.highlight"].FgColor; } | ||
} | ||
|
||
public override Color CheckBackground | ||
{ | ||
get { return Presets["ui.menu.checked"].FgColor; } | ||
} | ||
public override Color CheckSelectedBackground | ||
{ | ||
get { return Presets["ui.menu.highlight"].FgColor; } | ||
} | ||
|
||
public override Color ImageMarginGradientBegin | ||
{ | ||
get { return Presets["ui.menu"].BgColor; } | ||
} | ||
|
||
public override Color ImageMarginGradientMiddle | ||
{ | ||
get { return Presets["ui.menu"].BgColor; } | ||
} | ||
|
||
public override Color ImageMarginGradientEnd | ||
{ | ||
get { return Presets["ui.menu"].BgColor; } | ||
} | ||
} | ||
} |
Oops, something went wrong.