Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Widgetset
»
Cocoa
»
New versions of LCLCocoa - virtual treeview paints column headers black
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Forum slow
by
Curt Carpenter
[
Today
at 03:41:07 am]
Arabic text, problem on L...
by
Zaher
[
Today
at 03:29:16 am]
InstallAware Using Lazaru...
by
TRon
[
Today
at 02:55:41 am]
Generics - correct syntax
by
Blaazen
[
Today
at 01:57:40 am]
Demoscene The Champs Crac...
by
Gigatron
[
Today
at 01:05:16 am]
How to use the Event Log?
by
n7800
[
Today
at 12:47:25 am]
v3.99 code completion que...
by
440bx
[
Today
at 12:45:55 am]
FpDebug breakpoint on "be...
by
440bx
[
Today
at 12:36:23 am]
Access violation when re-...
by
TRon
[April 19, 2024, 11:44:51 pm]
[solved] how to get class...
by
jamie
[April 19, 2024, 11:34:44 pm]
Lazarus for Windows on aa...
by
Wallaby
[April 19, 2024, 10:52:25 pm]
Poll: Watches and Display...
by
440bx
[April 19, 2024, 07:13:51 pm]
Who is Indy mattias?
by
paweld
[April 19, 2024, 04:17:53 pm]
I just released a commerc...
by
BrassGear
[April 19, 2024, 03:17:28 pm]
Does anyone know why thes...
by
Laksen
[April 19, 2024, 03:04:14 pm]
Database standards OR Am ...
by
gidesa
[April 19, 2024, 02:37:56 pm]
How to: create DLL file f...
by
TRon
[April 19, 2024, 02:26:53 pm]
A fairly simple sound sol...
by
paweld
[April 19, 2024, 01:46:11 pm]
Access violation when ope...
by
Чебурашка
[April 19, 2024, 12:27:34 pm]
Step-into the field sette...
by
Martin_fr
[April 19, 2024, 11:31:48 am]
AI, NLP and CAI: Text Gen...
by
Dzandaa
[April 19, 2024, 11:03:26 am]
dwindows for Android
by
PierceNg
[April 19, 2024, 10:54:44 am]
create system unit from s...
by
Laksen
[April 19, 2024, 10:53:57 am]
[Solved] Find child contr...
by
Joanna
[April 19, 2024, 09:53:43 am]
FpDebug unexpected Assemb...
by
Marc
[April 19, 2024, 08:46:38 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: New versions of LCLCocoa - virtual treeview paints column headers black (Read 1983 times)
MISV
Hero Member
Posts: 792
New versions of LCLCocoa - virtual treeview paints column headers black
«
on:
February 17, 2021, 10:52:00 am »
Just updated to newest source and all column headers are now painted all black.
This happens with both
-
https://github.com/blikblum/VirtualTreeView-Lazarus/
- And version shipped in Lazarus (just did complete SVN update yesterday)
For the rest of this post I will be using the version shipped with Lazarus (laz.virtualtreeview / LazVirtualTreeview)
I havde made no code changes and there is no owner-draw or similar in play here. Content/data draws correctly.
Here is a link to error report on BlikBlum Github page:
https://github.com/blikblum/VirtualTreeView-Lazarus/issues/24
However, since blikblum and lazarus versions are not always fully sync'ed, I guess I will be using laz.virtualtreeview / LazVirtualTreeview for when debugging the issue through this forum.
I would appreciate is anyone else could also chip in and see if they experience the same error.
-- I do not believe Mac update affects this since my old compiled versions still work correctkly --
«
Last Edit: February 17, 2021, 11:43:38 am by MISV
»
Logged
MISV
Hero Member
Posts: 792
Re: New versions of LCLCocoa - virtual treeview paints column headers black
«
Reply #1 on:
February 17, 2021, 11:34:50 am »
Here is screenshot
Logged
balazsszekely
Guest
Re: New versions of LCLCocoa - virtual treeview paints column headers black
«
Reply #2 on:
February 17, 2021, 01:57:31 pm »
I cannot help you with the bug, since I don't own a Mac. However until the issue is fixed, why don't you owner draw the header background? The text, sort glyph, etc...can remain the same, only change the background color.
Logged
MISV
Hero Member
Posts: 792
Re: New versions of LCLCocoa - virtual treeview paints column headers black
«
Reply #3 on:
February 17, 2021, 04:53:27 pm »
If I can simply only override background color and that works then... Worth a try. I will report back tonight.
Logged
balazsszekely
Guest
Re: New versions of LCLCocoa - virtual treeview paints column headers black
«
Reply #4 on:
February 17, 2021, 05:20:08 pm »
@MISV
Try this:
1. Set VST->Header->Options hoOwnerDraw to true
2. Create the following events: OnAdvancedHeaderDraw and OnHeaderDrawQueryElements
3.
Code: Pascal
[Select]
[+]
[-]
uses
LCLType
;
procedure
TForm1
.
VSTAdvancedHeaderDraw
(
Sender
:
TVTHeader
;
var
PaintInfo
:
THeaderPaintInfo
;
const
Elements
:
THeaderPaintElements
)
;
begin
if
PaintInfo
.
Column
=
nil
then
begin
PaintInfo
.
TargetCanvas
.
Brush
.
Color
:
=
clBtnFace
;
//change this
PaintInfo
.
TargetCanvas
.
FillRect
(
PaintInfo
.
PaintRectangle
)
;
PaintInfo
.
TargetCanvas
.
FrameRect
(
PaintInfo
.
PaintRectangle
)
;
end
else
begin
PaintInfo
.
TargetCanvas
.
Brush
.
Color
:
=
$00C4C4C4
;
//similar to clBtnFace, change this
PaintInfo
.
PaintRectangle
.
Left
:
=
PaintInfo
.
PaintRectangle
.
Left
-
1
;
PaintInfo
.
PaintRectangle
.
Top
:
=
PaintInfo
.
PaintRectangle
.
Top
-
1
;
PaintInfo
.
TargetCanvas
.
FrameRect
(
PaintInfo
.
PaintRectangle
)
;
end
;
end
;
procedure
TForm1
.
VSTHeaderDrawQueryElements
(
Sender
:
TVTHeader
;
var
PaintInfo
:
THeaderPaintInfo
;
var
Elements
:
THeaderPaintElements
)
;
begin
Elements
:
=
Elements
+
[
hpeBackground
]
;
end
;
Logged
MISV
Hero Member
Posts: 792
Re: New versions of LCLCocoa - virtual treeview paints column headers black
«
Reply #5 on:
February 18, 2021, 01:24:41 am »
This solution works.
Seems clAppWorkSpace for header/columns background and clActiveBorder for borders/frames/separaters are the way to go...
Or
clWindow / clWindowFrame (latter for separators instead of frames)
I am not entirely sure they color choices will work well with both dark/white mac themes or other Mac OS themning/customization but seem like the two best bets
Should I report the original problem here as well:
https://bugs.freepascal.org/main_page.php
?
Logged
balazsszekely
Guest
Re: New versions of LCLCocoa - virtual treeview paints column headers black
«
Reply #6 on:
February 18, 2021, 06:16:24 am »
Without the possibility of debug, it looks like the theme service fails to get the correct background for the header under cocoa. Please mention this on the bugreport, maybe it helps with the fix.
Logged
MISV
Hero Member
Posts: 792
Re: New versions of LCLCocoa - virtual treeview paints column headers black
«
Reply #7 on:
February 18, 2021, 10:00:59 am »
I have submitted this bug report
https://bugs.freepascal.org/view.php?id=38507
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Widgetset
»
Cocoa
»
New versions of LCLCocoa - virtual treeview paints column headers black
TinyPortal
© 2005-2018