tradewright/tabcontrol-extra

Adjustable TabCloserButtonSize

Opened this issue · 4 comments

Currently the size of the closer button is a constant.
I tested it and found that it could be changed to a property.

I suggest that:
If the value is positive, it is an absolute size.
If the value is negative or zero, TabControlExtra calculates rendered size = tab height - padding + TabCloserButtonSize.

Interesting suggestion, but does anybody need or want it?

Everywhere I find tabs with closers, they always seem to be the same size: Edge, Firefox, Chrome, Visual Studio, NotePad++, etc. I can imagine in a touch environment you might want bigger closer buttons, but is that a likely use case for this control?

I'm not rejecting the idea, just wondering if it's worth the effort.

Thank you for replying.

I am using your control and previously the original one on a high DPI monitor.
I found that the close buttons were a bit too small and hoped that they could be a little bit larger so I and my users could click them more easily.

You have already made valuable modifications against the original control and the situation is a bit better. It should not be difficult to change the const to a property and use the tab height, which automatically changes according to system DPI, to adjust the size of the button.

Ok, I understand the problem now, but it may not be a trivial thing to fix. I need to get a better understanding first of how the autoscaling works, and why that doesn't affect the closer. It may be that I simply need to apply a scaling transformation when painting the closer button.