This kind of button is draw by the TThemedDropDownButton
class, So you must override this class and the TThemedDropDownButton.DrawBackground
method.
Using the same unit of the previous answer add a new class called TThemedDropDownButtonEx
TThemedDropDownButtonEx= class(TThemedDropDownButton)
protected
procedure DrawBackground(var PaintRect: TRect); override;
end;
Then implement the DrawBackground method like so
procedure TThemedDropDownButtonEx.DrawBackground(var PaintRect: TRect);
const
CheckedState: array[Boolean] of TThemedToolBar = (ttbButtonHot, ttbButtonCheckedHot);
var
LIndex : Integer;
begin
LIndex := SaveDC(Canvas.Handle);
try
if Enabled and not (ActionBar.DesignMode) then
begin
if (MouseInControl or IsChecked or DroppedDown) and
(Assigned(ActionClient) and not ActionClient.Separator) then
begin
StyleServices.DrawElement(Canvas.Handle, StyleServices.GetElementDetails(CheckedState[IsChecked or (FState = bsDown)]), PaintRect);
if IsChecked and not MouseInControl then
StyleServices.DrawElement(Canvas.Handle, StyleServices.GetElementDetails(ttbButtonPressed), PaintRect);
end
else
;
end
else
;
finally
RestoreDC(Canvas.Handle, LIndex);
end;
end;
and Finally modify the TPlatformVclStylesStyle.GetControlClass method on this way
Change this code
if AnItem.HasItems then
case GetActionControlStyle of
csStandard: Result := TStandardDropDownButton;
csXPStyle: Result := TXPStyleDropDownBtn;
else
Result := TThemedDropDownButton;
end
else
by this
if AnItem.HasItems then
case GetActionControlStyle of
csStandard: Result := TStandardDropDownButton;
csXPStyle: Result := TXPStyleDropDownBtn;
else
Result := TThemedDropDownButtonEx;
end
else