Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>2006-02-03 06:20:38 +0300
committerPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>2006-02-03 06:20:38 +0300
commit4c053210d030e8d60e8b673c692d69c0f98ca101 (patch)
tree121b8c2d791e9b81a16a1101a9fa8568935c9b9b /mcs/class/Managed.Windows.Forms
parent31903335a078247d29869e533fd140c857e61005 (diff)
2006-02-02 Peter Dennis Bartok <pbartok@novell.com>
* Control.cs: - ScaleCore needs to scale the bounds, not the ClientSize of the control. Fixes #77416. - DefaultSize is 0,0 for control * TextBoxBase.cs: - DefaultSize is 100, 20 - SetBoundsCore: Now enforcing the height, no matter if the provided height is more or less than the preferred one, as long as AutoSize is on * Form.cs: Apply documented fudge factor. Part of item 3 fix for #77416 svn path=/trunk/mcs/; revision=56505
Diffstat (limited to 'mcs/class/Managed.Windows.Forms')
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog13
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs6
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs4
4 files changed, 19 insertions, 8 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
index 38941650c81..a8258981bce 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
@@ -1,3 +1,16 @@
+2006-02-02 Peter Dennis Bartok <pbartok@novell.com>
+
+ * Control.cs:
+ - ScaleCore needs to scale the bounds, not the ClientSize of the
+ control. Fixes #77416.
+ - DefaultSize is 0,0 for control
+ * TextBoxBase.cs:
+ - DefaultSize is 100, 20
+ - SetBoundsCore: Now enforcing the height, no matter if the provided
+ height is more or less than the preferred one, as long as AutoSize
+ is on
+ * Form.cs: Apply documented fudge factor. Part of item 3 fix for #77416
+
2006-02-02 Peter Dennis Bartok <pbartok@novell.com>
* Control.cs:
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
index 2951911a79e..0098d01d825 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
@@ -2321,7 +2321,7 @@ namespace System.Windows.Forms
protected virtual Size DefaultSize {
get {
- return new Size(100, 23);
+ return new Size(0, 0);
}
}
@@ -3365,7 +3365,6 @@ namespace System.Windows.Forms
location = new Point((int)(Left * dx), (int)(Top * dy));
size = this.ClientSize;
-
if (!GetStyle(ControlStyles.FixedWidth)) {
size.Width = (int)(size.Width * dx);
@@ -3375,8 +3374,7 @@ namespace System.Windows.Forms
size.Height = (int)(size.Height * dy);
}
- Location = location;
- ClientSize = size;
+ SetBoundsCore(location.X, location.Y, size.Width, size.Height, BoundsSpecified.All);
/* Now scale our children */
Control [] controls = child_controls.GetAllControls ();
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
index 63ba28f7b27..f273483f7d7 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
@@ -1168,8 +1168,8 @@ namespace System.Windows.Forms {
// http://blogs.msdn.com/mharsh/archive/2004/01/25/62621.aspx
// but it makes things larger without looking better.
//
- Scale (current_size_f.Width / AutoScaleBaseSize.Width,
- current_size_f.Height / AutoScaleBaseSize.Height);
+ Scale (current_size_f.Width / AutoScaleBaseSize.Width + 0.08f,
+ current_size_f.Height / AutoScaleBaseSize.Height + 0.08f);
AutoScaleBaseSize = current_size;
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
index c67b7e7d4e9..37206a41b72 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
@@ -562,7 +562,7 @@ namespace System.Windows.Forms {
protected override System.Drawing.Size DefaultSize {
get {
- return base.DefaultSize;
+ return new Size(100, 20);
}
}
#endregion // Protected Instance Properties
@@ -1075,7 +1075,7 @@ namespace System.Windows.Forms {
// Make sure we don't get sized bigger than we want to be
if (!richtext) {
if (!multiline) {
- if (height > PreferredHeight) {
+ if (height != PreferredHeight) {
requested_height = height;
height = PreferredHeight;
specified |= BoundsSpecified.Height;