ComponentFactory.Krypton.Toolkit.RenderStandard.AdjustSmoothTab C# (CSharp) Method

AdjustSmoothTab() private static method

private static AdjustSmoothTab ( PaletteState state, Rectangle rect, VisualOrientation orientation ) : Rectangle
state PaletteState
rect System.Drawing.Rectangle
orientation VisualOrientation
return System.Drawing.Rectangle
        private static Rectangle AdjustSmoothTab(PaletteState state,
                                                 Rectangle rect,
                                                 VisualOrientation orientation)
        {
            // We alter the size of the tab drawn depending on the state
            switch (state)
            {
                case PaletteState.CheckedNormal:
                case PaletteState.CheckedPressed:
                case PaletteState.CheckedTracking:
                    break;
                default:
                    // Reduce the tab except on the connected edge
                    switch (orientation)
                    {
                        case VisualOrientation.Top:
                            rect.Height -= 4;
                            rect.Width -= 8;
                            rect.X += 4;
                            rect.Y += 4;
                            break;
                        case VisualOrientation.Bottom:
                            rect.Height -= 4;
                            rect.Width -= 8;
                            rect.X += 4;
                            break;
                        case VisualOrientation.Left:
                            rect.Height -= 8;
                            rect.Width -= 4;
                            rect.X += 4;
                            rect.Y += 4;
                            break;
                        case VisualOrientation.Right:
                            rect.Height -= 8;
                            rect.Width -= 4;
                            rect.Y += 4;
                            break;
                    }
                    break;
            }

            return rect;
        }
RenderStandard