Skip to content

[Bug]: KryptonForm border width does not follow StateXXX.Border.Width #2878

@hopla

Description

@hopla

Summary

Regression of the KryptonForm borderwidth not following the StateXXX.Border.Width property.

Description

Starting in Krypton Toolkit 100 version, KryptonForm always has a thick border, even if the StateXXX.Border.Width property is set to e.g. 1.
This behavior was re-introduced in commit 665ec32 - 2304-V100-KryptonForm-border-issues, by removing the following lines from CommonHelper.GetWindowBorders:

// Set the values determined by the formBorder.BorderWidths etc.
rect.left = -xOffset;
rect.right = xOffset;
rect.bottom = yOffset;

In commit 0060627 - 2304-V100-krypton-form-border-issues (#2610) the CommonHelper.GetWindowBorders version that accepots a KryptonForm was completely removed, preventing the method to even take the border settings into account.

Steps to Reproduce

Set StateCommon.Border.Width = 1;

Expected Behavior

Thin border of 1px.

Actual Behavior

Thick border. (Of 8px??)

Operating System

Windows 11

OS Version

No response

Framework/.NET Version

Framework 4.8.1

Toolkit Version

100 release / current Alpha branch

Additional Information

No response

Areas Affected

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolkitAll issues related to the toolkit components.version:105-ltsAll things to do with V105 LTS.version:110All things to do with V110.💥 regressionSomething was working in a previous release, but isn't working now.🪲 bugSomething isn't working

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions