Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003379 [JEDI VCL] 00 JVCL Components tweak always 2005-12-23 01:17 2006-01-19 13:25
Reporter ivan_ra View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0003379: TJvMainMenu and TJvPopupMenu are incompatible with ancestors (TMainMenu and TPopupMenu)
Description TJvMainMenu and TJvPopupMenu are not draw TMenuItem.Bitmap. They only can draw glyphs from Images property.
They ancestors are draws custom TMenuItem.image from Bitmap property when TMenuItem.ImageIndex or Menu.Images property is not "valid"

This is because this methods are incomplete:

procedure TJvCustomMenuItemPainter.DrawDisabledImage(X, Y: Integer);
procedure TJvCustomMenuItemPainter.DrawEnabledImage(X, Y: Integer);

procedure TJvXPMenuItemPainter.DrawEnabledImage(X, Y: Integer);
procedure TJvXPMenuItemPainter.DrawDisabledImage(X, Y: Integer);
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0008234)
ivan_ra (developer)
2005-12-23 02:06

More precisely, incomplete method is TJvCustomMenuItemPainter.Paint (does not check Item.Bitmap)
(0008321)
obones (administrator)
2006-01-07 06:43

Thanks, this is now fixed in CVS.
(0008366)
ivan_ra (developer)
2006-01-11 02:41

Bitmap painting stilll incomplete.
TMenuItem.Bitmap can be any size, but TJvCustomMenuItemPainter.Paint does not uses StretchDraw as it did in menus.pas. So, items icons can have various size, and more, can not be located at all in allocated rect's
(0008393)
obones (administrator)
2006-01-16 01:49

Yes, but then which size should I use for the stretch draw?
The values in the ImageSize property?
(0008401)
ivan_ra (developer)
2006-01-17 21:11

I'm not so familiar with JvMenus code. If using of ImageSize property is enough to fit image into item rectangle, I think it good idea
(0008402)
obones (administrator)
2006-01-18 04:10

Well, ImageSize is 0 by default. So I propose the following logic:

If ImageIndex is set, use ImageList size
If Bitmap is set then
  if ImageSize is set, use it
  else use MenuItem.Height-2 as the width and height of the image rectangle
else use ImageSize

the -2 is to ensure a small margin between adjacent images, which with the current painters is required to fit in the text height. I'm quite sure the VCL hardcoded 16x16, but I prefer to be a bit more flexible.
Any opinions on this? I plan on integrating this tonight (Paris time).
(0008406)
obones (administrator)
2006-01-19 13:25

This is now in CVS, the default size being 16x16 (hard coded) as the VCL does.
Should any extensions be required, please create a new issue, do not reopen this one.

- Issue History
Date Modified Username Field Change
2005-12-23 01:17 ivan_ra New Issue
2005-12-23 02:06 ivan_ra Note Added: 0008234
2006-01-05 07:54 obones Status new => assigned
2006-01-05 07:54 obones Assigned To => obones
2006-01-07 06:43 obones Status assigned => resolved
2006-01-07 06:43 obones Resolution open => fixed
2006-01-07 06:43 obones Note Added: 0008321
2006-01-11 02:41 ivan_ra Status resolved => feedback
2006-01-11 02:41 ivan_ra Resolution fixed => reopened
2006-01-11 02:41 ivan_ra Note Added: 0008366
2006-01-16 01:49 obones Note Added: 0008393
2006-01-17 21:11 ivan_ra Note Added: 0008401
2006-01-18 04:10 obones Note Added: 0008402
2006-01-19 13:25 obones Status feedback => resolved
2006-01-19 13:25 obones Resolution reopened => fixed
2006-01-19 13:25 obones Note Added: 0008406


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker