+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
}
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);
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
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
}
protected override void OnVisibleChanged(EventArgs e) {
- ;; // Nothing to do yet
+ base.OnVisibleChanged(e);
}
protected override void ScaleCore(float dx, float dy) {
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
}
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 {
}\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