protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) { GraphicsHelper helper = new GraphicsHelper(e.Graphics); Rectangle bounds = new Rectangle(-1, -1, e.AffectedBounds.Width + 1, e.AffectedBounds.Height + 1); //helper.Clear(UColor.Argb(255, 0, 0, 0)); helper.Gradient(UColor.Rgb(0x30, 0x30, 0x30), UColor.Rgb(0x1D, 0x1D, 0x1D), bounds, 90); }
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) { GraphicsHelper helper = new GraphicsHelper(e.Graphics); ToolStripButton button = e.Item as ToolStripButton; Rectangle bounds = new Rectangle(0, 0, e.Item.Width - 1, e.Item.Height - 1); if (e.Item.Selected) { helper.RoundedGradient(UColor.Rgb(0x06, 0x88, 0xB8), UColor.Rgb(0x06, 0x88, 0xB8), bounds, 90, 2); } }
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) { GraphicsHelper helper = new GraphicsHelper(e.Graphics); Rectangle bounds = e.AffectedBounds; helper.Line(UColor.Blend(155 / 2, UColor.Rgb(0x06, 0x88, 0xD8)), 0, bounds.Width, bounds.Height - 3); helper.Line(UColor.Blend(155, UColor.Rgb(0x06, 0x88, 0xD8)), 0, bounds.Width, bounds.Height - 2); helper.Line(UColor.Rgb(0x06, 0x88, 0xD8), 0, bounds.Width, bounds.Height - 1); // helper.Line(UColor.Rgb(25, 25, 25), 0, bounds.Width, bounds.Height - 1); base.OnRenderToolStripBorder(e); }
public void OnPaintItem(PaintEventArgs e, MenuBarItem item) { GraphicsHelper helper = new GraphicsHelper(e.Graphics); const int radius = 3; Rectangle bound = item.Bound; helper.RoundedGradient(UColor.Rgb(0x4d, 0x9f, 0xcf), UColor.Rgb(0x15, 0x69, 0x97), item.Bound, 90, radius); helper.Gradient(UColor.Blend(130, UColor.White), UColor.Blend(70, UColor.White), new Rectangle(item.Bound.X, item.Bound.Y + 1, 1, item.Bound.Height - radius), 90); helper.Gradient(UColor.Blend(130, UColor.White), UColor.Blend(70, UColor.White), new Rectangle(item.Bound.X + item.Bound.Width - radius + 2, item.Bound.Y + 1, 1, item.Bound.Height - radius), 90); helper.RoundedOutline(UColor.Rgb(0x18, 0x18, 0x18), item.Bound, radius); helper.Line(UColor.White, bound.X + radius, bound.Y + bound.Height - 1, bound.Width - radius, bound.Y + bound.Height - 1); }
public void OnPaintBarBackground(PaintEventArgs e) { GraphicsHelper graphics = new GraphicsHelper(e.Graphics); const int radius = 7; const int blend = 245; Rectangle bound = new Rectangle(DisplayRectangle.X + 1, DisplayRectangle.Y, Width - 3, Height - 2); graphics.RoundedFill(UColor.White, bound, radius); graphics.RoundedGradient(UColor.Blend(blend, UColor.Rgb(60, 60, 60)), UColor.Blend(blend, UColor.Rgb(38, 38, 38)), bound, 90, radius); graphics.RoundedOutline(UColor.Black, new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1), radius); graphics.Line(UColor.Blend(50, UColor.White), radius, 0, Width - radius, 0); }