mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 02:39:15 +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 = teToolBar) and (Details.Part = TP_SEPARATOR)) or
|
||||||
((Details.Element = teScrollBar) and (Details.Part in [SBP_UPPERTRACKHORZ, SBP_LOWERTRACKHORZ, SBP_THUMBBTNHORZ, SBP_GRIPPERHORZ])) then
|
((Details.Element = teScrollBar) and (Details.Part in [SBP_UPPERTRACKHORZ, SBP_LOWERTRACKHORZ, SBP_THUMBBTNHORZ, SBP_GRIPPERHORZ])) then
|
||||||
Result := Result or QStyleState_Horizontal;
|
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;
|
end;
|
||||||
|
|
||||||
function TQtThemeServices.GetDetailSize(Details: TThemedElementDetails): Integer;
|
function TQtThemeServices.GetDetailSize(Details: TThemedElementDetails): Integer;
|
||||||
@ -449,6 +456,14 @@ begin
|
|||||||
Result.SubControls := QStyleSC_None;
|
Result.SubControls := QStyleSC_None;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
teTreeView:
|
||||||
|
begin
|
||||||
|
if Details.Part = TVP_GLYPH then
|
||||||
|
begin
|
||||||
|
Result.DrawVariant := qdvPrimitive;
|
||||||
|
Result.PrimitiveElement := QStylePE_IndicatorBranch
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1974,7 +1974,7 @@ begin
|
|||||||
Tmp := (ARect.Bottom + ARect.Top) shr 1;
|
Tmp := (ARect.Bottom + ARect.Top) shr 1;
|
||||||
MoveToEx(DC, ARect.Left + 2, Tmp, nil);
|
MoveToEx(DC, ARect.Left + 2, Tmp, nil);
|
||||||
LineTo(DC, ARect.Right - 2, Tmp);
|
LineTo(DC, ARect.Right - 2, Tmp);
|
||||||
if Details.State = 1 then
|
if Details.State = GLPS_CLOSED then
|
||||||
begin
|
begin
|
||||||
Tmp := (ARect.Left + ARect.Right) shr 1;
|
Tmp := (ARect.Left + ARect.Right) shr 1;
|
||||||
MoveToEx(DC, Tmp, ARect.Top + 2, nil);
|
MoveToEx(DC, Tmp, ARect.Top + 2, nil);
|
||||||
|
Loading…
Reference in New Issue
Block a user