mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:19:17 +02:00
LCL: Improve TTreeView expand/collapse node arrows in Hi-DPI mode. Issue #30866, patch from Anton Kavalenka.
git-svn-id: trunk@53459 -
This commit is contained in:
parent
9a379ab39a
commit
7ac7d691f9
@ -4855,7 +4855,7 @@ var
|
|||||||
tvestTheme:
|
tvestTheme:
|
||||||
begin
|
begin
|
||||||
// draw a themed expand sign. Todo: track hot
|
// draw a themed expand sign. Todo: track hot
|
||||||
R := Rect(ALeft, ATop, ARight + 1, ABottom + 1);
|
R := Rect(ALeft, ATop, ARight, ABottom);
|
||||||
Details := ThemeServices.GetElementDetails(PlusMinusDetail[False, CollapseSign]);
|
Details := ThemeServices.GetElementDetails(PlusMinusDetail[False, CollapseSign]);
|
||||||
ThemeServices.DrawElement(Canvas.Handle, Details, R, nil);
|
ThemeServices.DrawElement(Canvas.Handle, Details, R, nil);
|
||||||
end;
|
end;
|
||||||
@ -4993,6 +4993,7 @@ var
|
|||||||
CurBackgroundColor,bclr: TColor;
|
CurBackgroundColor,bclr: TColor;
|
||||||
begin
|
begin
|
||||||
bclr:=Canvas.Brush.Color;
|
bclr:=Canvas.Brush.Color;
|
||||||
|
CurBackgroundColor:=clNone;
|
||||||
try
|
try
|
||||||
if (tvoRowSelect in Options) and IsSelected then
|
if (tvoRowSelect in Options) and IsSelected then
|
||||||
if tvoThemedDraw in Options then
|
if tvoThemedDraw in Options then
|
||||||
@ -5056,8 +5057,12 @@ var
|
|||||||
if (tvoThemedDraw in Options) then
|
if (tvoThemedDraw in Options) then
|
||||||
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_CENTER or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX, 0)
|
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_CENTER or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX, 0)
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
|
if isSelected then
|
||||||
|
Canvas.Brush.Style:=bsClear;
|
||||||
DrawText(Canvas.Handle, PChar(AText), -1, NodeRect, DT_CENTER or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX);
|
DrawText(Canvas.Handle, PChar(AText), -1, NodeRect, DT_CENTER or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX);
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user