public BetterTooltipTransparentOverlay(Control overlayedControl)
{
_overlayedControl = overlayedControl;
// We want our control to be transparent. However, this causes the parent
// background color to be painted instead of the control we're overlaying, so we
// need to do some special magic in OnPaint and draw the button we're overlaying.
// Originally the code set the Opaque style to prevent the background from painting,
// but on Linux that causes some pixels to not be redrawn when switching between
// tabs.
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
UpdateStyles();
BackColor = Color.Transparent;
// Make sure to set the AutoScaleMode property to None
// so that the location and size property don't automatically change
// when placed in a form that has different font than this.
AutoScaleMode = AutoScaleMode.None;
// Tab stop on a transparent sheet makes no sense.
TabStop = false;
}