DarkUI icon indicating copy to clipboard operation
DarkUI copied to clipboard

ToolStripSplitButton is not displaying dropdown arrow

Open danielj23 opened this issue 5 years ago • 1 comments

I tried poking around but I couldn't see how to resolve it.

When adding a ToolStripSplitButton to a DarkToolstrip, the dropdown arrow (on the right) is missing. The dropdown menu appears when you click in the space, but the button icon itself is missing.

The focus events are not rendering the mouse over, either.

Also, thanks for all your work on this project.

danielj23 avatar Oct 20 '20 21:10 danielj23

in DarkToolStripRenderer.cs I added the code below and that triggers the proper painting of the hovered area, but I haven't yet figured out the arrow. It seems odd to me that the arrow appears on the DropDownButton.

protected override void OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs e) { var g = e.Graphics;

        var rect = new Rectangle(0, 1, e.Item.Width, e.Item.Height - 2);

        if (e.Item.Selected || e.Item.Pressed)
        {
            using (var b = new SolidBrush(BackColors.GreySelection))
            {
                g.FillRectangle(b, rect);
            }
        } 
    }

danielj23 avatar Oct 20 '20 21:10 danielj23