* ThemeWin32Classic.cs (ButtonBase_DrawImage): Use the proper image
for determining width and height (image might not be assigned if
we're drawing an imagelist)
svn path=/trunk/mcs/; revision=60155
+2006-05-01 Peter Dennis Bartok <pbartok@novell.com>
+
+ * ThemeWin32Classic.cs (ButtonBase_DrawImage): Use the proper image
+ for determining width and height (image might not be assigned if
+ we're drawing an imagelist)
+
2006-05-01 Peter Dennis Bartok <pbartok@novell.com>
* XplatUI.cs, XplatUIDriver.cs: Added MenuHeight property
int width = button.ClientSize.Width;
int height = button.ClientSize.Height;
-
+
if (button.ImageIndex != -1) { // We use ImageIndex instead of image_index since it will return -1 if image_list is null
i = button.image_list.Images[button.image_index];
} else {
i = button.image;
}
-
- image_width = button.image.Width;
- image_height = button.image.Height;
+
+ image_width = i.Width;
+ image_height = i.Height;
switch (button.image_alignment) {
case ContentAlignment.TopLeft: {