From ebd031e3bed6c1cfddce8fc9b98f7f9e95fb9e32 Mon Sep 17 00:00:00 2001 From: tangxu <tangxu76880903> Date: 星期一, 04 十一月 2024 17:33:38 +0800 Subject: [PATCH] 添加OCC融合 --- WinFrmUI/DPumpHydr.WinFrmUI.Ribbon/Classes/Renderers/RibbonProfessionalRenderer.cs | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Ribbon/Classes/Renderers/RibbonProfessionalRenderer.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Ribbon/Classes/Renderers/RibbonProfessionalRenderer.cs index 62b4caa..8824725 100644 --- a/WinFrmUI/DPumpHydr.WinFrmUI.Ribbon/Classes/Renderers/RibbonProfessionalRenderer.cs +++ b/WinFrmUI/DPumpHydr.WinFrmUI.Ribbon/Classes/Renderers/RibbonProfessionalRenderer.cs @@ -313,11 +313,13 @@ public void DrawArrowShaded(Graphics g, Rectangle b, RibbonArrowDirection d, bool enabled) { Size arrSize = arrowSize; + Point lightOffset = new Point(0, 1); if (d == RibbonArrowDirection.Left || d == RibbonArrowDirection.Right) { //Invert size - arrSize = new Size(arrowSize.Height, arrowSize.Width); + arrSize = new Size(arrowSize.Height, arrowSize.Width + 1); + lightOffset = new Point(1, 0); } Point arrowP = new Point( @@ -326,7 +328,8 @@ ); Rectangle bounds = new Rectangle(arrowP, arrSize); - Rectangle boundsLight = bounds; boundsLight.Offset(0, 1); + Rectangle boundsLight = bounds; + boundsLight.Offset(lightOffset); Color lt = ColorTable.ArrowLight; Color dk = ColorTable.Arrow; @@ -3614,13 +3617,13 @@ { using (GraphicsPath path = RoundRectangle(bounds, 3)) { - using (SolidBrush b = new SolidBrush(SystemColors.Window)) + using (SolidBrush b = new SolidBrush(ColorTable.TextBoxSelectedBg)) { //g.FillPath(b, path); g.FillRectangle(b, bounds); } - using (Pen p = new Pen(ColorTable.TextBoxBorder)) + using (Pen p = new Pen(ColorTable.TextBoxSelectedBorder)) { //g.DrawPath(p, path); g.DrawRectangle(p, bounds); @@ -4249,8 +4252,13 @@ Color OrbDropDownSeparatorlight = ColorTable.OrbDropDownSeparatorlight; Color OrbDropDownSeparatordark = ColorTable.OrbDropDownSeparatordark; - GraphicsPath innerPath = RoundRectangle(InnerRect, 6); - GraphicsPath outerPath = RoundRectangle(OuterRect, 6); + // Issue #11: OrbStyle + int minorBorderRoundness = e.RibbonOrbDropDown.BorderRoundness - 2; + if (minorBorderRoundness < 0) + minorBorderRoundness = 0; + + GraphicsPath innerPath = RoundRectangle(InnerRect, minorBorderRoundness); + GraphicsPath outerPath = RoundRectangle(OuterRect, minorBorderRoundness); e.Graphics.SmoothingMode = SmoothingMode.None; -- Gitblit v1.9.3