patchDotGNU Portable.NET - Patches: patch #3565, Fix two Form size issues

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #3565: Fix two Form size issues

Submitter:  Marc Haisenko <darkdust>
Submitted:  Fri 10 Dec 2004 04:38:07 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Sat 11 Dec 2004 11:30:51 AM UTC, comment #1: 

Applied to cvs 12/11/2004  Klaus

Klaus Treichel <ktreichel>
Group administrator
Fri 10 Dec 2004 04:38:07 PM UTC, original submission:  

This patch fixes two size problem in Form.cs (they appear on X Window, I don't know whether they also have an effect on Windows but I assume so).

The first problem was that the ClientSize on Forms with FormBorderStyle.None was wrong because ClientToBounds and ToolkitDrawSize both used ToolkitManager.Toolkit.GetWindowAdjust. GetWindowAdjust should return the size of the window decorations. Because there is no way to get the size of the window decorations on X Window that would work with all window managers this function returns a few fixed values that are quite good on most systems. But obviously they are completely wrong when no decoration is present at all ;-)

This bug is normally not a very visible one except when you embed a Form in another Form (I can post a test application that demonstrates this bug plus some screenshots if someone wants to see it).

So we need to ignore the size returned by Toolkit.GetWindowAdjust when FormBorderStyle == FormBorderStyle.None in both Form.ClientToBounds and Form.ToolkitDrawSize

The second problem was that changing the FrameBorderStyle didn't resize the window/update the internal sizes.

This is simply fixed by remembering the ClientSize, changing the border style and then setting the ClientSize back to the remembered value.

Marc Haisenko <darkdust>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #8151:  Form.cs.patch added by darkdust (2KiB - text/x-diff - Patch that fixes two Form size issues)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-12-11 ktreichel StatusNone Done
    Open/ClosedOpen Closed
2004-12-10 darkdust Attached File- Added Form.cs.patch, #3934

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code