mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 18:40:33 +02:00
carbon: fix black bg and font color for TMemo and other edits (fixes bug #0018100)
git-svn-id: trunk@28569 -
This commit is contained in:
parent
c83a527bce
commit
a8e325c064
@ -1861,7 +1861,10 @@ procedure TCarbonMemo.SetColor(const AColor: TColor);
|
||||
var
|
||||
CGColor: CGColorRef;
|
||||
begin
|
||||
CGColor := CreateCGColor(AColor);
|
||||
if AColor = clDefault then
|
||||
CGColor := CreateCGColor(LCLObject.GetDefaultColor(dctBrush))
|
||||
else
|
||||
CGColor := CreateCGColor(AColor);
|
||||
try
|
||||
OSError(HITextViewSetBackgroundColor(HIViewRef(Widget), CGColor),
|
||||
Self, SSetColor, 'HITextViewSetBackgroundColor');
|
||||
@ -1903,7 +1906,10 @@ begin
|
||||
ATSUCreateAndCopyStyle(TCarbonFont(AFont.Reference.Handle).Style, SavedStyle);
|
||||
try
|
||||
// set font color
|
||||
TCarbonFont(AFont.Reference.Handle).SetColor(AFont.Color);
|
||||
if AFont.Color = clDefault then
|
||||
TCarbonFont(AFont.Reference.Handle).SetColor(LCLObject.GetDefaultColor(dctFont))
|
||||
else
|
||||
TCarbonFont(AFont.Reference.Handle).SetColor(AFont.Color);
|
||||
|
||||
// font style
|
||||
Attrs[3].tag := kTXNATSUIStyle;
|
||||
|
Loading…
Reference in New Issue
Block a user