diff options
author | Jean-Marc.Levecque <jmarc.levecque@bbox.fr> | 2014-10-13 15:55:52 +0200 |
---|---|---|
committer | Jean-Marc.Levecque <jmarc.levecque@bbox.fr> | 2014-10-13 15:55:52 +0200 |
commit | dc36d9ae9b4f7e737000acc7298ab3fed9ee7ce4 (patch) | |
tree | c75e31227263c9a52d8ba983c2d7972b9f3991d9 /src/gui | |
parent | e8267e5a998de1924f436cb2b8b85a24096806ef (diff) | |
download | fpGUI-dc36d9ae9b4f7e737000acc7298ab3fed9ee7ce4.tar.xz |
Make the selected text in editcombo follow the theme color
Signed-off-by: Jean-Marc.Levecque <jmarc.levecque@bbox.fr>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_editcombo.pas | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/fpg_editcombo.pas b/src/gui/fpg_editcombo.pas index 5b011b4d..62ca79d2 100644 --- a/src/gui/fpg_editcombo.pas +++ b/src/gui/fpg_editcombo.pas @@ -734,17 +734,17 @@ var // paint selection rectangle procedure DrawSelection; var - lcolor: TfpgColor; + lcolor,ltxtcolor: TfpgColor; begin if Focused then begin lcolor := clSelection; - Canvas.SetTextColor(clSelectionText); + ltxtcolor := clSelectionText; end else begin lcolor := clInactiveSel; - Canvas.SetTextColor(clText1); + ltxtcolor := clText1; end; len := FSelOffset; @@ -759,16 +759,16 @@ var // XOR on Anti-aliased text doesn't look to good. Lets try standard // Blue & White like what was doen in TfpgEdit. -{ Canvas.SetColor(lcolor); + Canvas.SetColor(lcolor); Canvas.FillRectangle(-FDrawOffset + FMargin + tw, 3, tw2 - tw, Font.Height); r.SetRect(-FDrawOffset + FMargin + tw, 3, tw2 - tw, Font.Height); Canvas.AddClipRect(r); - Canvas.SetTextColor(clWhite); - fpgStyle.DrawString(Canvas, -FDrawOffset + FMargin, 3, Text, Enabled); + Canvas.SetTextColor(ltxtcolor); + fpgStyle.DrawString(Canvas, -FDrawOffset + FMargin + tw, 3, UTF8Copy(Items[FSelectedItem], Succ(st), Pred(len)), Enabled); Canvas.ClearClipRect; -} - Canvas.XORFillRectangle(fpgColorToRGB(lcolor) xor $FFFFFF, - -FDrawOffset + FMargin + tw, 3, tw2 - tw, Font.Height); + + //Canvas.XORFillRectangle(fpgColorToRGB(lcolor) xor $FFFFFF, + // -FDrawOffset + FMargin + tw, 3, tw2 - tw, Font.Height); end; begin |