Recent

Author Topic: TCheckComboBox ghost  (Read 3735 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1698
  • Former Delphi 1-7, 10.2 user
TCheckComboBox ghost
« on: September 29, 2021, 05:58:10 am »
The TCheckComboBox ghosts the visible element. See attached pic and trivial project.

Lazarus + FPC - main branches as of 24 Sep 2021.
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 x86_64 Xcode 13.1
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 aarch64 Xcode 13.1
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 VM

dbannon

  • Hero Member
  • *****
  • Posts: 1679
    • tomboy-ng, a rewrite of the classic Tomboy
Re: TCheckComboBox ghost
« Reply #1 on: September 29, 2021, 07:52:04 am »
I expect its the same with other components in quite unpredictable situations.  I have reported it....
Only ever seen it on Cocoa.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1698
  • Former Delphi 1-7, 10.2 user
Re: TCheckComboBox ghost
« Reply #2 on: September 29, 2021, 02:16:21 pm »
Bug number? (To add to) I did search your bugs but there were only two and not relevant.
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 x86_64 Xcode 13.1
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 aarch64 Xcode 13.1
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 VM

dbannon

  • Hero Member
  • *****
  • Posts: 1679
    • tomboy-ng, a rewrite of the classic Tomboy
Re: TCheckComboBox ghost
« Reply #3 on: September 30, 2021, 02:01:08 am »
https://forum.lazarus.freepascal.org/index.php/topic,53055.0.html

It seemed to be sufficiently well known about for me to not bother with a bug report.  I quote -

"it has been haunting CocoaWS from the start."

You contributed to that particular thread too.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1698
  • Former Delphi 1-7, 10.2 user
Re: TCheckComboBox ghost
« Reply #4 on: September 30, 2021, 03:33:50 am »
That thread was about upside down text, not ghosting text and was resolved in trunk, at least for my issues.

I’ll log a bug 😇
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 x86_64 Xcode 13.1
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 aarch64 Xcode 13.1
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 VM

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2718
    • havefunsoft.com
Re: TCheckComboBox ghost
« Reply #5 on: October 02, 2021, 06:08:24 am »
a couple of issues are happening here:
*OwnerDraw style is not fully supported. It doesn't hide the text
*The theme information is returning a bit odd results. The checkbox width seems to be too wide and the top offset it too low.

As trev mentioned, this is definitely not the issue that is "haunting CocoaWS from the start."

ChrisR

  • Full Member
  • ***
  • Posts: 229
Re: TCheckComboBox ghost
« Reply #6 on: October 02, 2021, 01:44:12 pm »
I use the method from here
  https://wiki.freepascal.org/TComboBox#Preceded_image
I use the base color of the combobox as the background to erase the background
    ComboBox1.Canvas.Brush.Color:= ComboBox1.Color;
It works pretty well. It does not show the currently selected item as highlighted, and so is useless for navigation with arrow keys.

Perhaps others can suggest how I determine the themes highlight colors or any other suggestions.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2718
    • havefunsoft.com
Re: TCheckComboBox ghost
« Reply #7 on: October 03, 2021, 12:26:11 am »
you might want to try this branch:
https://github.com/skalogryz/Lazarus/tree/cocoa

it gets rid of the "ghosting" but the placement is not great yet.

upd: the placement should be more reasonable now as well.
« Last Edit: October 03, 2021, 07:20:24 am by skalogryz »

 

TinyPortal © 2005-2018