/[dotgnu-pnet]/pnetlib/System.Windows.Forms/MainMenu.cs
ViewVC logotype

Diff of /pnetlib/System.Windows.Forms/MainMenu.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by Rich333, Fri May 21 09:16:33 2004 UTC revision 1.8 by drobosson, Wed Dec 29 12:30:00 2004 UTC
# Line 138  using System.Drawing; Line 138  using System.Drawing;
138                  {                  {
139                          using (Graphics g = ownerForm.CreateNonClientGraphics())                          using (Graphics g = ownerForm.CreateNonClientGraphics())
140                          {                          {
141                                    int i = 0;
142    
143                                  // Measure the menus if they need to be.                                  // Measure the menus if they need to be.
144                                  if (itemBounds == null)                                  if (itemBounds == null)
145                                  {                                  {
146                                          MeasureItemBounds(g);                                          MeasureItemBounds(g);
147                                  }                                  }
148                                  for (int i = 0; i < MenuItems.Count; i++)                                  for (i = 0; i < MenuItems.Count; i++)
149                                  {                                  {
150                                          DrawMenuItem(g, i, false);                                          DrawMenuItem(g, i, false);
151                                  }                                  }
152                                    // Fill in the rest of the menu, or the whole lot if no items
153                                    if(i > 0)
154                                    {
155                                            i--;
156                                            g.FillRectangle(SystemBrushes.Menu, new Rectangle(
157                                                                    itemBounds[i].X + itemBounds[i].Width, 0,
158                                                                    ownerForm.Width - MenuPaddingSize.Width,
159                                                                    SystemInformation.MenuHeight));
160                                    }
161                                    else
162                                    {
163                                            g.FillRectangle(SystemBrushes.Menu, new Rectangle
164                                                            (MenuPaddingOrigin.X, MenuPaddingOrigin.Y,
165                                                             ownerForm.Width - MenuPaddingSize.Width,
166                                                             ownerForm.Height - MenuPaddingSize.Height));
167                                    }
168                          }                          }
169                  }                  }
170    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26