gtk2: fixed treeitem painting.

lcl: revert my latest patch for font.color setting when treeitem is selected.

git-svn-id: trunk@24860 -
This commit is contained in:
zeljko 2010-04-23 19:27:28 +00:00
parent 17d46fff76
commit 0e9ff79e50
2 changed files with 12 additions and 11 deletions

View File

@ -4529,7 +4529,7 @@ var
Details := ThemeServices.GetElementDetails(ttItemNormal);
if ( (tvoThemedDraw in Options) or
(tvoRowSelect in Options) ) and Focused and IsSelected then
(tvoRowSelect in Options) ) and IsSelected then
Canvas.Font.Color := InvertColor(Brush.Color);
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_CENTER or DT_VCENTER, 0);

View File

@ -128,7 +128,7 @@ begin
Result.Painter := gptFlatBox;
case Details.State of
TREIS_SELECTED,
TREIS_HOTSELECTED: Result.State := GTK_STATE_SELECTED
TREIS_HOTSELECTED: Result.State := GTK_STATE_SELECTED;
else
Result.State := GTK_STATE_NORMAL;
end;
@ -138,15 +138,16 @@ begin
if AIndex = 1 then
begin
Result.Detail := 'treeview';
case Details.State of
TREIS_SELECTED,
TREIS_SELECTEDNOTFOCUS:
begin
Result.Painter := gptFocus;
Result.State := GTK_STATE_PRELIGHT;
end;
else
Result.Painter := gptNone;
Result.State := GTK_STATE_SELECTED;
if Details.State = TREIS_SELECTED then
Result.Painter := gptFocus
else
if Details.State = TREIS_SELECTEDNOTFOCUS then
Result.Painter := gptFlatBox
else
begin
Result.State := GTK_STATE_NORMAL;
Result.Painter := gptNone;
end;
end;
end;