Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Border Rounding Issue #569

Closed
sdreb3421 opened this issue Jan 4, 2022 · 2 comments
Closed

[Bug]: Border Rounding Issue #569

sdreb3421 opened this issue Jan 4, 2022 · 2 comments
Labels
answered This question has been adequately answered. bug Something isn't working regression Something was working in a previous release, but isn't working now.

Comments

@sdreb3421
Copy link

sdreb3421 commented Jan 4, 2022

The latest stable release (6.2201.4) introduced a bug into how the library handles border rounding. This is only apparent if you create a rounded border but not draw the border edge.

Perform the steps below. In previous versions, this would show the control with rounded corners but not draw the border edge. In the latest version, this stops drawing the rounding all together. I've found this to be true for KButtons, KCheckButtons, KGroupBoxes, so I assume it applies to the rounding code for all controls.

  1. Set StateCommon.Border.Rounding = 10.
  2. Set StateCommon.Border.DrawBorders = Top | Bottom | Left | Right
  3. Set StateCommon.Border.Draw = False.

This affects almost all of the controls in our application. We rarely want to show a border on our controls, so rather than adjusting the palette to make sure the border colors match the back colors everywhere , we just don't draw them.

@sdreb3421 sdreb3421 added the bug Something isn't working label Jan 4, 2022
@PWagner1 PWagner1 added the regression Something was working in a previous release, but isn't working now. label Jan 5, 2022
@Smurf-IV
Copy link
Member

Smurf-IV commented Jan 8, 2022

I'm confused. If Draw is set to false then it will not draw borders.. This was a bug fix from a while back..
Relevant bug is #510
So what is required , Round controls but not the border line ?? If so then just set the border colour to be transparent.

StateCommon.Border.Color1 = System.Drawing.Color.Transparent;
StateCommon.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom) 
            | Krypton.Toolkit.PaletteDrawBorders.Left) 
            | Krypton.Toolkit.PaletteDrawBorders.Right)));
StateCommon.Border.Rounding = 10F;

This then gives:
image

@Smurf-IV Smurf-IV added the answered This question has been adequately answered. label Jan 8, 2022
@sdreb3421
Copy link
Author

I can't really figure out why the previous behavior was considered a bug, but I can make this work.

@Smurf-IV Smurf-IV closed this as completed Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered This question has been adequately answered. bug Something isn't working regression Something was working in a previous release, but isn't working now.
Projects
None yet
Development

No branches or pull requests

3 participants