mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 05:19:37 +02:00
Qt5: use cocoa theme to draw toolbuttons
This commit is contained in:
parent
88e9c521d7
commit
0e040a0d77
@ -1129,15 +1129,26 @@ begin
|
|||||||
TP_DROPDOWNBUTTON,
|
TP_DROPDOWNBUTTON,
|
||||||
TP_SPLITBUTTON: // there is another positibility to draw TP_SPLITBUTTON by CC_ToolButton
|
TP_SPLITBUTTON: // there is another positibility to draw TP_SPLITBUTTON by CC_ToolButton
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF DARWIN}
|
||||||
|
Result.DrawVariant := qdvComplexControl;
|
||||||
|
Result.ComplexControl := QStyleCC_ToolButton;
|
||||||
|
Result.SubControls := QStyleSC_ToolButton;
|
||||||
|
Result.Features := QStyleOptionToolButtonNone;
|
||||||
|
{$ELSE}
|
||||||
Result.DrawVariant := qdvPrimitive;
|
Result.DrawVariant := qdvPrimitive;
|
||||||
Result.PrimitiveElement := QStylePE_PanelButtonTool;
|
Result.PrimitiveElement := QStylePE_PanelButtonTool;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
TP_SPLITBUTTONDROPDOWN:
|
TP_SPLITBUTTONDROPDOWN:
|
||||||
begin
|
begin
|
||||||
Result.DrawVariant := qdvComplexControl;
|
Result.DrawVariant := qdvComplexControl;
|
||||||
Result.ComplexControl := QStyleCC_ToolButton;
|
Result.ComplexControl := QStyleCC_ToolButton;
|
||||||
Result.SubControls := QStyleSC_None;
|
Result.SubControls := QStyleSC_None;
|
||||||
|
{$IFDEF DARWIN}
|
||||||
|
Result.Features := QStyleOptionToolButtonHasMenu;
|
||||||
|
{$ELSE}
|
||||||
Result.Features := QStyleOptionToolButtonMenuButtonPopup;
|
Result.Features := QStyleOptionToolButtonMenuButtonPopup;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
TP_SEPARATOR,
|
TP_SEPARATOR,
|
||||||
TP_SEPARATORVERT:
|
TP_SEPARATORVERT:
|
||||||
|
Loading…
Reference in New Issue
Block a user