Bug 547627 - Table: event.width set with unexpected value for SWT.PaintItem event
Summary: Table: event.width set with unexpected value for SWT.PaintItem event
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.12   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-24 08:57 EDT by Thomas Singer CLA
Modified: 2021-05-22 06:02 EDT (History)
2 users (show)

See Also:


Attachments
Snippet (2.19 KB, text/plain)
2019-05-24 08:58 EDT, Thomas Singer CLA
no flags Details
Screenshot on Windows 10 (15.68 KB, image/png)
2019-05-24 08:59 EDT, Thomas Singer CLA
no flags Details
Screenshot on Linux (CentOS 7.6.1810) (13.78 KB, image/png)
2019-05-24 09:07 EDT, Thomas Singer CLA
no flags Details
Screenshot on macOS 10.14 (19.79 KB, image/png)
2019-05-24 09:23 EDT, Thomas Singer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2019-05-24 08:57:50 EDT
Please take a look at the attached snippet. It should draw a diagonal line for testing purposes using the values in the event. Unfortunately, this does not work as expected. I would have expected that event.width will contain the width of the cell/column, but this obviously is not the case. Is my expectation wrong?
Comment 1 Thomas Singer CLA 2019-05-24 08:58:20 EDT
Created attachment 278739 [details]
Snippet
Comment 2 Thomas Singer CLA 2019-05-24 08:59:20 EDT
Created attachment 278740 [details]
Screenshot on Windows 10
Comment 3 Thomas Singer CLA 2019-05-24 09:02:25 EDT
When debugging in Table.sendPaintItemEvent I noticed, that itemRect.right does not contain a useful value - maybe because it is an owner drawn table? But then the correct cellWidth and cellHeight are calculated for setting the clipping. Unfortunately, event.width and event.height aren't updated.
Comment 4 Thomas Singer CLA 2019-05-24 09:07:16 EDT
Created attachment 278741 [details]
Screenshot on Linux (CentOS 7.6.1810)
Comment 5 Thomas Singer CLA 2019-05-24 09:23:24 EDT
Created attachment 278742 [details]
Screenshot on macOS 10.14

At least the platforms seem to be consistent - though useless in ownerdrawn tables. For performance reasons I'd like to avoid to call TableItem#getBounds(int) if this information already is available while sending the PaintItem event.
Comment 6 Thomas Singer CLA 2019-05-28 14:22:20 EDT
I have not used the "[Win32]" prefix, because on other platforms the value is also set to an unexpected value.
Comment 7 Eric Williams CLA 2019-05-28 14:25:30 EDT
(In reply to Thomas Singer from comment #6)
> I have not used the "[Win32]" prefix, because on other platforms the value
> is also set to an unexpected value.

Oops, sorry about that.
Comment 8 Eclipse Genie CLA 2021-05-18 08:11:20 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 9 Thomas Singer CLA 2021-05-22 06:02:11 EDT
Bug is still present.