View Issue Details

IDProjectCategoryView StatusLast Update
0036714LazarusLCLpublic2020-05-01 20:46
Reporterwp Assigned ToDmitry Boyarintsev  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
PlatformMac OS / CocoaOSMojave  
Summary0036714: Cocoa: Drawing issue for custom-drawn listbox
DescriptionOwner-drawn listboxes (Style = lbOwnerDrawFixed) have some issues in Cocoa:

(1) Transparent Bitmaps are drawn up-side down
(2) ThemeServices are ignored.
Steps To ReproduceRun 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 InformationSee also attached screenshots.

Possibly related:
0036021: Cocoa Catalina: ComboBox text appears upside down

Tested with:
- 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

Additional observation:
- Cocoa always reports ThemeServices.ThemesEnables and ThemeServices.ThemesAvailable as false. Is this correct?
TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Relationships

related to 0036021 confirmedDmitry Boyarintsev Cocoa Catalina: ComboBox text appears upside down 

Activities

wp

2020-02-19 16:59

developer  

custom_listbox_cocoa.png (9,012 bytes)   
custom_listbox_cocoa.png (9,012 bytes)   
custom_listbox_win.png (4,000 bytes)   
custom_listbox_win.png (4,000 bytes)   

Issue History

Date Modified Username Field Change
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