qt: extend toolbar parts theme drawing (more details)

git-svn-id: trunk@12890 -
This commit is contained in:
paul 2007-11-16 08:50:17 +00:00
parent b5b7109b34
commit c75b605920

View File

@ -37,6 +37,7 @@ type
end; end;
{ TQtThemeServices } { TQtThemeServices }
TQtThemeServices = class(TThemeServices) TQtThemeServices = class(TThemeServices)
private private
FStyle: QStyleH; FStyle: QStyleH;
@ -237,8 +238,9 @@ begin
// specific states // specific states
// define splitter orientation // define orientations
if (Details.Element = teRebar) and (Details.Part = RP_GRIPPER) then if ((Details.Element = teRebar) and (Details.Part = RP_GRIPPER)) or
((Details.Element = teToolBar) and (Details.Part = TP_SEPARATOR)) then
Result := Result or QStyleState_Horizontal; Result := Result or QStyleState_Horizontal;
end; end;
@ -298,10 +300,25 @@ begin
end; end;
teToolBar: teToolBar:
begin begin
if Details.Part = TP_BUTTON then case Details.Part of
begin TP_BUTTON,
Result.DrawVariant := qdvPrimitive; TP_DROPDOWNBUTTON,
Result.PrimitiveElement := QStylePE_PanelButtonTool; TP_SPLITBUTTON: // there is another positibility to draw TP_SPLITBUTTON by CC_ToolButton
begin
Result.DrawVariant := qdvPrimitive;
Result.PrimitiveElement := QStylePE_PanelButtonTool;
end;
TP_SPLITBUTTONDROPDOWN:
begin
Result.DrawVariant := qdvPrimitive;
Result.PrimitiveElement := QStylePE_IndicatorButtonDropDown;
end;
TP_SEPARATOR,
TP_SEPARATORVERT:
begin
Result.DrawVariant := qdvPrimitive;
Result.PrimitiveElement := QStylePE_IndicatorToolBarSeparator;
end;
end; end;
end; end;
teRebar: teRebar: