View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006091 | JEDI VCL | 00 JVCL Components | public | 2013-02-25 01:22 | 2015-09-14 14:11 |
Reporter | altaveron | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Product Version | 3.47 | ||||
Target Version | Fixed in Version | ||||
Summary | 0006091: Incorrect background of the image on the grid indicator column | ||||
Description | The grid indicator column displays an incorrect background of the image for the current record. Please look to the screenshot. Background of the image should be transparent. | ||||
Tags | No tags attached. | ||||
2013-02-25 01:22
|
|
|
It's JVDBGRIDMSARROW resource image and one more (as on the screenshot). |
|
There are 3 images total: 'JvDBGridMSDOT' and 'JvDBGridMSARROW' from resource file and one more (as on the screenshot). |
|
How to increase priority of the issue? |
|
It seems the error raises from using TCustomDBGrid.DrawCell method, and then over the basic image TJvDBGrid draws the images with transparent background from JvDBGrid.res: JvDBGridMSDOT ? JvDBGridMSARROW. |
|
There are two errors: on TCustomDBGrid.DrawCell and on TJvDBGrid.DrawCell. To fix the second error it's enough to comment the following line: // FMsIndicators.BkColor := FixedColor; |
|
FixedColor should be set to reproduce the issue on Windows XP. And the issue will be more noticeable on Windows XP with FixedColor = clRed. |
|
The correct version of the previous comment: FixedColor should be set to reproduce the issue on Windows XP. And the issue will be more noticeable on Windows 7+ with FixedColor = clRed. |
|
> How to increase priority of the issue? By fixing it yourself. Delphi is on decline, and such are all FLOSS and commercial libraries... |
|
Attach demo project, showing the bug please |
2013-09-04 04:32
|
Project1.zip (83,912 bytes) |
|
Arioch, done! |
|
Can anybody fix it for money? |
|
I'm sorry, but the issue seems to come from TDBGrid itself, I couldn't find an easy way to circumvent this. I mean, in your example, replace TJvDBGrid by TDBGrid, and you'll see the same issue. |
|
The FIX: procedure TJvDBGrid.DoDrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); var aBitmap: TBitmap; x, y: Integer; aPixel: PRGBTriple; ... // fix image background issue comes from TDBGrid if DataLink.Active and (ARow - TitleOffset = Datalink.ActiveRecord) then if (dgIndicator in Options) and (ACol = 0) then begin aBitmap := TBitmap.Create; try aBitmap.PixelFormat := pf24bit; aBitmap.Height := ARect.Height; aBitmap.Width := ARect.Width; aBitmap.Canvas.CopyRect(TRect.Create(0, 0, aBitmap.Width, aBitmap.Height), Canvas, ARect); for y := 0 to aBitmap.Height - 1 do for x := 0 to aBitmap.Width - 1 do begin aPixel := aBitmap.ScanLine[y]; Inc(aPixel, x); if // fix image background issue with default color // Abs() <= 1 condition is required for Windows XP ((Abs($f0 - aPixel^.rgbtRed) <= 1) and (Abs($f0 - aPixel^.rgbtGreen) <= 1) and (Abs($f0 - aPixel^.rgbtBlue) <= 1)) or // fix image background issue with FixedColor ((Abs(GetRValue(FixedColor) - aPixel^.rgbtRed) <= 1) and (Abs(GetGValue(FixedColor) - aPixel^.rgbtGreen) <= 1) and (Abs(GetBValue(FixedColor) - aPixel^.rgbtBlue) <= 1)) then aPixel^ := PRGBTriple(aBitmap.ScanLine[y])^; end; Canvas.Draw(ARect.Left, ARect.Top, aBitmap); finally aBitmap.Free; end; end; end; |
|
http://qc.embarcadero.com/wc/qcmain.aspx?d=122886 |
|
Well, if EMB won't fix it, we can't do much about it |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-25 01:22 | altaveron | New Issue | |
2013-02-25 01:22 | altaveron | File Added: issue.png | |
2013-02-25 01:44 | altaveron | Note Added: 0020446 | |
2013-02-25 02:25 | altaveron | Note Added: 0020447 | |
2013-07-16 14:24 | altaveron | Note Added: 0020573 | |
2013-08-16 20:39 | altaveron | Note Added: 0020582 | |
2013-08-21 19:40 | altaveron | Note Added: 0020588 | |
2013-08-21 20:02 | altaveron | Note Added: 0020589 | |
2013-08-21 20:16 | altaveron | Note Added: 0020592 | |
2013-08-31 04:03 | Arioch | Note Added: 0020612 | |
2013-08-31 04:03 | Arioch | Note Added: 0020613 | |
2013-09-04 04:32 | altaveron | File Added: Project1.zip | |
2013-09-04 04:33 | altaveron | Note Added: 0020633 | |
2013-09-27 15:12 | altaveron | Note Added: 0020643 | |
2013-12-13 11:05 | obones | Status | new => acknowledged |
2013-12-13 14:43 | obones | Relationship added | related to 0006182 |
2013-12-16 12:08 | obones | Note Added: 0020852 | |
2013-12-16 12:08 | obones | Status | acknowledged => feedback |
2014-03-03 10:23 | altaveron | Note Added: 0020922 | |
2014-03-03 11:16 | altaveron | Note Added: 0020925 | |
2014-12-04 16:38 | obones | Status | feedback => acknowledged |
2015-09-14 14:11 | obones | Note Added: 0021200 | |
2015-09-14 14:11 | obones | Status | acknowledged => resolved |
2015-09-14 14:11 | obones | Resolution | open => won't fix |
2015-09-14 14:11 | obones | Assigned To | => obones |