On Nov 18, 2007 12:15 AM, Tobias Giesen <[EMAIL PROTECTED]> wrote:
> Hello,
>
> some change made since last week caused my TMemo to use the same color
> for the font that is used for the background. Only selected text can be
> seen. It does not matter which colors I choose for foreground or
> background.
>
> My quick fix is to comment out the body of TCarbonMemo.SetFont in
> CarbonEdits.pp. But the actual cause is not in this function, since
> CarbonEdits.pp has not changed lately.
>
> Any ideas?
>
Sorry, that was probably caused by my changes and I have not noticed
such a bug. Look at CarbonCanvas.pp:

procedure TCarbonControlContext.Reset;
begin
  inherited Reset;

  if CGContext <> nil then
    if CurrentBrush <> nil then // apply control background color
    begin
      if FOwner.LCLObject.Color <> clBtnFace then
        CurrentBrush.SetColor(FOwner.LCLObject.Color, True)
      else
        CurrentBrush.SetColor(FOwner.LCLObject.Color, False);

      CurrentBrush.Apply(Self, False);
    end;

  if FOwner.LCLObject.Font.Handle <> 0 then
    CurrentFont := TCarbonFont(FOwner.LCLObject.Font.Handle);
end;

And try commenting last lines. I have not access to Mac at the moment
but I will repair it as soon as I can.

Tom

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to