- Removed debug output
authorPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Mon, 31 Jan 2005 01:54:01 +0000 (01:54 -0000)
committerPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Mon, 31 Jan 2005 01:54:01 +0000 (01:54 -0000)
- Setting proper foreground and background color for TextBox
- Added workaround for Form VisibleChanged notifications

svn path=/trunk/mcs/; revision=39816

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/NotifyIcon.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs

index 4d61ba294faa83efb9b7837520a9873502c87b65..0556efc64a00b14430cd865ac96c1c96aa86d111 100644 (file)
@@ -1,3 +1,15 @@
+2005-01-30  Peter Bartok  <pbartok@novell.com>
+
+       * NotifyIcon.cs (CalculateIconRect): Removed debug output and added
+         sanity check to prevent theoretical loop
+       * XplatUIWin32.cs (SetVisible): Removed debug output
+       * XplatUIX11.cs (SystrayChange): Added sanity check
+       * ScrollableControl.cs (OnVisibleChanged): Now calls base method
+       * Control.cs (OnVisibleChanged): Added workaround for ParentForm
+         behaviour, valid until the X11 client window rewrite is done
+       * TextBox.cs (ctor): Setting proper default foreground and background
+         colors
+
 2005-01-30     John BouAntoun  <jba-mono@optusnet.com.au>
 
        * Theme: Added DrawDateTimePicker to interface
index d52bca00ac6a0707534f99b6c8458dfa154388ad..e19fe520e38e90af63e9ee4f8eb7bad8bc681580 100644 (file)
@@ -3829,7 +3829,15 @@ namespace System.Windows.Forms
                        }
                        
                        if (VisibleChanged!=null) VisibleChanged(this, e);
+//hack start
+                       if (this is Form.FormParentWindow) {
+                               Form    form;
 
+                               form = ((Form.FormParentWindow)this).owner;
+
+                               form.OnVisibleChanged(e);
+                       }
+// hack end
                        // We need to tell our kids
                        for (int i=0; i<child_controls.Count; i++) {
                                child_controls[i].OnParentVisibleChanged(e);
index 446bdaf1bf975fa7842225d9531fd4de7efc69c3..a8e675f47e49fa1a9b6bce66dd6946fc9b948bb0 100644 (file)
@@ -135,8 +135,6 @@ namespace System.Windows.Forms {
                                        int             y;
                                        int             size;\r
 \r
-Console.WriteLine("CalculateIconRect: Width:{0}, Height:{1}", Width, Height);\r
-\r
                                        // Icons are always square. Try to center them in the window\r
                                        if (ClientRectangle.Width < ClientRectangle.Height) {\r
                                                size = ClientRectangle.Width;\r
@@ -148,8 +146,13 @@ Console.WriteLine("CalculateIconRect: Width:{0}, Height:{1}", Width, Height);
                                        rect = new Rectangle(x, y, size, size);\r
 \r
                                        // Force our window to be square\r
-                                       this.Width = size;\r
-                                       this.Height = size;\r
+                                       if (Width != size) {\r
+                                               this.Width = size;\r
+                                       }\r
+\r
+                                       if (Height != size) {\r
+                                               this.Height = size;\r
+                                       }\r
                                }\r
                        }\r
 \r
index b195adffa0ea219991bbb916c0787fb17775f32f..0f667b99e0b25818049d1d9c29579d7732d1cfe8 100644 (file)
@@ -363,7 +363,7 @@ namespace System.Windows.Forms {
                }
 
                protected override void OnVisibleChanged(EventArgs e) {
-                       ;; // Nothing to do yet
+                       base.OnVisibleChanged(e);
                }
 
                protected override void ScaleCore(float dx, float dy) {
index 20db2d3e6d7a2fb2e19f73e5fd636c533355c8bf..08b29663636c1e4be388096d0590b887ff7421ed 100644 (file)
@@ -42,6 +42,8 @@ namespace System.Windows.Forms {
                        scrollbars = ScrollBars.None;
                        alignment = HorizontalAlignment.Left;
                        this.LostFocus +=new EventHandler(TextBox_LostFocus);
+                       this.BackColor = ThemeEngine.Current.ColorWindow;
+                       this.ForeColor = ThemeEngine.Current.ColorWindowText;
                }
                #endregion      // Public Constructors
 
index 1beb1e2a9ccbb177669e3a4937b61b91286abb97..c0ac7d2282e60b25ae4d11d5b114db8ac59876d2 100644 (file)
@@ -1074,7 +1074,6 @@ namespace System.Windows.Forms {
                }
 
                internal override bool SetVisible(IntPtr handle, bool visible) {
-Console.WriteLine("Win32 Driver called, setting {0} visible: {1}", Control.FromHandle(handle).Text, visible);
                        if (visible) {
                                Win32ShowWindow(handle, WindowPlacementFlags.SW_SHOWNORMAL);
                        } else {
index 512b88b43caf18c8cc73953954f09cbcab178846..6907424c42aedfd7e58f42c6d09edf55af526779 100644 (file)
@@ -2465,9 +2465,16 @@ namespace System.Windows.Forms {
                }\r
 \r
                internal override bool SystrayChange(IntPtr hwnd, string tip, Icon icon, ref ToolTip tt) {\r
-                       tt.SetToolTip(Control.FromHandle(hwnd), tip);\r
-                       tt.Active = true;\r
-                       return true;\r
+                       Control control;\r
+\r
+                       control = Control.FromHandle(hwnd);\r
+                       if (control != null && tt != null) {\r
+                               tt.SetToolTip(control, tip);\r
+                               tt.Active = true;\r
+                               return true;\r
+                       } else {\r
+                               return false;\r
+                       }\r
                }       \r
 
                internal override void SystrayRemove(IntPtr hwnd, ref ToolTip tt) {\r