mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 08:09:26 +02:00
qt: implement themed drawing of +/- tree signs
git-svn-id: trunk@17231 -
This commit is contained in:
parent
0f81182102
commit
c50c24cb56
@ -290,6 +290,13 @@ begin
|
||||
((Details.Element = teToolBar) and (Details.Part = TP_SEPARATOR)) or
|
||||
((Details.Element = teScrollBar) and (Details.Part in [SBP_UPPERTRACKHORZ, SBP_LOWERTRACKHORZ, SBP_THUMBBTNHORZ, SBP_GRIPPERHORZ])) then
|
||||
Result := Result or QStyleState_Horizontal;
|
||||
|
||||
if (Details.Element = teTreeview) and (Details.Part = TVP_GLYPH) then
|
||||
begin
|
||||
Result := Result or QStyleState_Children;
|
||||
if Details.State = GLPS_OPENED then
|
||||
Result := Result or QStyleState_Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TQtThemeServices.GetDetailSize(Details: TThemedElementDetails): Integer;
|
||||
@ -449,6 +456,14 @@ begin
|
||||
Result.SubControls := QStyleSC_None;
|
||||
end;
|
||||
end;
|
||||
teTreeView:
|
||||
begin
|
||||
if Details.Part = TVP_GLYPH then
|
||||
begin
|
||||
Result.DrawVariant := qdvPrimitive;
|
||||
Result.PrimitiveElement := QStylePE_IndicatorBranch
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -1974,7 +1974,7 @@ begin
|
||||
Tmp := (ARect.Bottom + ARect.Top) shr 1;
|
||||
MoveToEx(DC, ARect.Left + 2, Tmp, nil);
|
||||
LineTo(DC, ARect.Right - 2, Tmp);
|
||||
if Details.State = 1 then
|
||||
if Details.State = GLPS_CLOSED then
|
||||
begin
|
||||
Tmp := (ARect.Left + ARect.Right) shr 1;
|
||||
MoveToEx(DC, Tmp, ARect.Top + 2, nil);
|
||||
|
Loading…
Reference in New Issue
Block a user