Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Documents/Changelog/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## 2026-04-20 - Build 2604 (Version 105-LTS - Patch 2) - April 2026

* Resolved [#3013](https://github.com/Krypton-Suite/Standard-Toolkit/issues/3013), Maximized form's size exceeds the screen's working area
* Implemented [#3113](https://github.com/Krypton-Suite/Standard-Toolkit/issues/3113), TextBox item for KryptonContextMenu-Items
* Resolved [#3124](https://github.com/Krypton-Suite/Standard-Toolkit/issues/3124), Docking: Loading configuration while form is hidden remover splitter
* Resolved [#3123](https://github.com/Krypton-Suite/Standard-Toolkit/issues/3123), `KryptonComboBox` DropDownWidth doesn't resize with the control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2634,27 +2634,32 @@ private void PerformViewPaint(Graphics g, Rectangle rect)
}
}

private void UpdateRegionForMaximized()
{
if (MdiParent == null)
{
// Fix for #2457 / #3012: Do not apply a clipping region when maximized.
// For RTL layout mode, disable region clipping to prevent border issues (#2457).
// For all maximized forms, skip region so the title bar, control box, and left/top/bottom
// edges are not cut off (#3012 - controlbox and buttonspace not show full when maximized).
SuspendPaint();
_regionWindowState = FormWindowState.Maximized;
UpdateBorderRegion(null);
ResumePaint();
}
else
{
// As a maximized Mdi Child we do not need any border region
UpdateBorderRegion(null);
}
}

private void UpdateBorderRegion(Region? newRegion)
// Fix for #3013 : This change restores the original implementation of UpdateRegionForMaximized.
private void UpdateRegionForMaximized()
{
if (MdiParent == null)
{
// Get the size of each window border
Padding padding = RealWindowBorders;

// Reduce the Bounds by the padding on all but the top
var maximizedRect = new Rectangle(padding.Left, padding.Left, Width - padding.Horizontal,
Height - padding.Left - padding.Bottom);

// Use this as the new region
SuspendPaint();
_regionWindowState = FormWindowState.Maximized;
UpdateBorderRegion(new Region(maximizedRect));
ResumePaint();
}
else
{
// As a maximized Mdi Child we do not need any border region
UpdateBorderRegion(null);
}
}

private void UpdateBorderRegion(Region? newRegion)
{
if ((newRegion != null)
&& (newRegion.IsEmpty(CreateGraphics()))
Expand Down
Loading