Author: everaldo
Date: 2007-01-02 03:29:26 -0500 (Tue, 02 Jan 2007)
New Revision: 70337
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs
Log:
* MenuAPI.cs:
- Down submenu positin in three pixels.
- Closes sub menu when mouse leaves from menu. Fixes #80402.
2007-01-02 Everaldo Canuto <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-02 07:51:44 UTC (rev 70336)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-02 08:29:26 UTC (rev 70337)
@@ -1,5 +1,11 @@
2007-01-02 Everaldo Canuto <[EMAIL PROTECTED]>
+ * MenuAPI.cs:
+ - Down submenu positin in three pixels.
+ - Closes sub menu when mouse leaves from menu. Fixes #80402.
+
+2007-01-02 Everaldo Canuto <[EMAIL PROTECTED]>
+
* ThemeWin32Classic.cs:
- Fix popup menu size adding one pixel on the top.
- Down menu item border from two to one to mimic Win32.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs
2007-01-02 07:51:44 UTC (rev 70336)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs
2007-01-02 08:29:26 UTC (rev 70337)
@@ -159,10 +159,15 @@
if (item == null) {
MenuItem old_item = CurrentMenu.SelectedItem;
- if ((active && old_item.IsPopup &&
old_item.VisibleItems) || (keynav_state == KeyNavState.Navigating))
+ // Return when is a popup with visible subitems
for MainMenu
+ if ((active && old_item.VisibleItems &&
old_item.IsPopup && (CurrentMenu is MainMenu)))
return;
- /* Select parent menu when move outside of menu
item */
+ // Also returns when keyboard navigating
+ if (keynav_state == KeyNavState.Navigating)
+ return;
+
+ // Select parent menu when move outside of menu
item
if (old_item.Parent is MenuItem) {
MenuItem new_item = (old_item.Parent as
MenuItem);
if (new_item.IsPopup) {
@@ -280,6 +285,7 @@
if (CurrentMenu != menu)
CurrentMenu = menu;
+
item.Selected = true;
menu.InvalidateItem (item);
@@ -290,7 +296,6 @@
ExecFocusedItem (menu, item);
}
-
// Used when the user executes the action of an item
(press enter, shortcut)
// or a sub-popup menu has to be shown
void ExecFocusedItem (Menu menu, MenuItem item)
@@ -332,7 +337,7 @@
if (menu is MainMenu)
pnt = new Point (item.X, item.Y + item.Height -
2 - menu.Height);
else
- pnt = new Point (item.X + item.Width, item.Y +
1);
+ pnt = new Point (item.X + item.Width - 3,
item.Y - 3);
pnt = menu.Wnd.PointToScreen (pnt);
puw.Location = pnt;
item.Wnd = puw;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches