From 21879eb6a2f047081075212e76b158d0327400c7 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Tue, 22 Dec 2020 15:00:39 +0000 Subject: [PATCH] ExCtrls: Activate background painting in TColumnComboboxEx again to fix invisible text in some Linux desktops. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7942 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/exctrls/source/excombo.pas | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/components/exctrls/source/excombo.pas b/components/exctrls/source/excombo.pas index 2d39d8283..8d9a07ebe 100644 --- a/components/exctrls/source/excombo.pas +++ b/components/exctrls/source/excombo.pas @@ -211,6 +211,15 @@ begin exit; end; + if DroppedDown then + begin + if (odSelected in State) then + Canvas.Brush.Color := clHighlight + else if (Canvas.Brush.Color <> Color) then + Canvas.Brush.Color := Color; + Canvas.FillRect(ARect); + end; + if Index < 0 then txt := '' else @@ -220,15 +229,6 @@ begin FParser.Delimiter := FDelimiter; FParser.DelimitedText := txt; - if not(odBackgroundPainted in State) then - Canvas.FillRect(ARect); - -{ if (odSelected in State) then - Canvas.Brush.Color := clHighlight - else if (Canvas.Brush.Color <> Color) then - Canvas.Brush.Color := Color; - Canvas.FillRect(ARect);} - y := ARect.Top + (ARect.Height - FTextHeight) shr 1; Canvas.Brush.Style := bsClear; // transparent text background