View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0036714||Lazarus||LCL||public||2020-02-19 16:59||2020-05-01 20:46|
|Reporter||wp||Assigned To||Dmitry Boyarintsev|
|Platform||Mac OS / Cocoa||OS||Mojave|
|Summary||0036714: Cocoa: Drawing issue for custom-drawn listbox|
|Description||Owner-drawn listboxes (Style = lbOwnerDrawFixed) have some issues in Cocoa:|
(1) Transparent Bitmaps are drawn up-side down
(2) ThemeServices are ignored.
|Steps To Reproduce||Run attached demo. |
(1) At the left, there is an owner-drawn listbox which draws bitmaps as icons for each listbox item. One icon is a runtime created bitmap, a red diagonal line running from top-left to right-bottom, on yellow background - in the listbox, however, the line runs from left-bottom to right-top. The same code is used for drawing the line in the OnPaint event of a Paintbox below - now the line is drawn correctly. The other icon displays a bitmap created by drawing a themed checkmark. Again, the checkmark is inverted. Note that the bitmap must be transparent for this effect to occur.
(2) The owner-drawn listbox at the right is supposed to display checkboxes in front of the listbox item texts. These checkboxes are drawn immediately by calling the ThemeServices.Drawelement for the Listbox canvas. However, nothing is drawn. The paintbox below the listbox uses the same code to draw in the OnPaint event - no problem here.
The same program when run on Windows or Linux/gtk2/qt works as expected.
|Additional Information||See also attached screenshots.|
0036021: Cocoa Catalina: ComboBox text appears upside down
- Lazarus 2.1.0 r62644M FPC 3.0.4 x86_64-darwin-cocoa (beta) --> reported behavior
- Lazarus 2.1.0 r62638M FPC 3.0.4 i386-win32-win32/win64 -- > ok
- Lazarus 2.1.0 r62587M FPC 3.0.2 i386-linux-gtk2 or qt --> ok
- Cocoa always reports ThemeServices.ThemesEnables and ThemeServices.ThemesAvailable as false. Is this correct?
|Tags||No tags attached.|
|Fixed in Revision|
|2020-02-19 16:59||wp||New Issue|
|2020-02-19 16:59||wp||File Added: custom_listbox_cocoa.png|
|2020-02-19 16:59||wp||File Added: custom_listbox_win.png|
|2020-02-19 16:59||wp||File Added: cocoa_ownerdrawn_listbox.zip|
|2020-02-19 17:22||wp||Steps to Reproduce Updated||View Revisions|
|2020-02-19 17:22||wp||Additional Information Updated||View Revisions|
|2020-02-19 17:22||wp||LazTarget||=> -|
|2020-02-19 17:26||wp||Relationship added||related to 0036021|
|2020-05-01 20:46||Dmitry Boyarintsev||Assigned To||=> Dmitry Boyarintsev|
|2020-05-01 20:46||Dmitry Boyarintsev||Status||new => assigned|