mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-01-22 00:10:27 +01:00
Create ToolStripSeparator for Separator item
This commit is contained in:
parent
a7f16dbde6
commit
7b1442db14
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
@ -49,6 +49,8 @@ namespace PowerControl
|
|||
|
||||
public class MenuItemSeparator : MenuItem
|
||||
{
|
||||
private ToolStripItem toolStripItem;
|
||||
|
||||
public MenuItemSeparator()
|
||||
{
|
||||
Selectable = false;
|
||||
|
|
@ -56,6 +58,11 @@ namespace PowerControl
|
|||
|
||||
public override void CreateMenu(ToolStripItemCollection collection)
|
||||
{
|
||||
if (toolStripItem != null)
|
||||
return;
|
||||
|
||||
toolStripItem = new ToolStripSeparator();
|
||||
collection.Add(toolStripItem);
|
||||
}
|
||||
|
||||
public override string Render(MenuItem selected)
|
||||
|
|
|
|||
Loading…
Reference in a new issue