From c720b8116d89daa36792361ac5574ce11f3543b9 Mon Sep 17 00:00:00 2001 From: wp Date: Wed, 17 Oct 2018 17:25:15 +0000 Subject: [PATCH] TurboPower_ipro: Fix rendering of text background (not 100% correct for headers). git-svn-id: trunk@59315 - --- components/turbopower_ipro/iphtmlblocklayout.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/turbopower_ipro/iphtmlblocklayout.pas b/components/turbopower_ipro/iphtmlblocklayout.pas index 0ddece7d59..9cc312fc01 100644 --- a/components/turbopower_ipro/iphtmlblocklayout.pas +++ b/components/turbopower_ipro/iphtmlblocklayout.pas @@ -1267,6 +1267,7 @@ var OldFontColor: TColor; OldFontStyle: TFontStyles; OldBrushStyle: TBrushStyle; + ts: TTextStyle; procedure saveCanvasProperties; begin @@ -1322,8 +1323,11 @@ begin if FCanvas.Font.color = -1 then FCanvas.Font.color := clBlack; {$ENDIF} - if aCurWord.AnsiWord <> NAnchorChar then - FCanvas.TextRect(R, P.x, P.y, NoBreakToSpace(aCurWord.AnsiWord)); + if aCurWord.AnsiWord <> NAnchorChar then begin + ts := FCanvas.TextStyle; + ts.Opaque := true; + FCanvas.TextRect(R, P.x, P.y, NoBreakToSpace(aCurWord.AnsiWord), ts); + end; {$IFDEF IP_LAZARUS} restoreCanvasProperties; {$ENDIF}