lcl: draw non-focused selection state if treeview has no focus (todo: invalidate on focus lose)

git-svn-id: trunk@24818 -
This commit is contained in:
paul 2010-04-22 09:34:39 +00:00
parent 0e21a3965e
commit be2511dff9

View File

@ -4476,7 +4476,10 @@ var
if (tvoRowSelect in Options) and IsSelected then
if tvoThemedDraw in Options then
begin
Details := ThemeServices.GetElementDetails(ttItemSelected);
if Focused then
Details := ThemeServices.GetElementDetails(ttItemSelected)
else
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
ThemeServices.DrawElement(Canvas.Handle, Details, ARect, nil);
Exit;
end
@ -4497,7 +4500,10 @@ var
begin
if IsSelected then
begin
Details := ThemeServices.GetElementDetails(ttItemSelected);
if Focused then
Details := ThemeServices.GetElementDetails(ttItemSelected)
else
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
if not (tvoRowSelect in Options) then
if (tvoThemedDraw in Options) then
ThemeServices.DrawElement(Canvas.Handle, Details, NodeRect, nil)