mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Workaround - missing arrows on the toolbar buttons under Qt6 (issue #2750)
This commit is contained in:
parent
b5f9bae122
commit
7af7de1d8a
1 changed files with 24 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ unit Interfaces;
|
|||
interface
|
||||
|
||||
uses
|
||||
InterfaceBase, LCLType, Themes, QtInt, QtThemes, Types, uWayland;
|
||||
InterfaceBase, LCLType, Themes, QtInt, QtThemes, Types, LCLVersion, uWayland;
|
||||
|
||||
type
|
||||
|
||||
|
|
@ -14,6 +14,9 @@ type
|
|||
TQtThemeServicesEx = class(TQtThemeServices)
|
||||
public
|
||||
function GetStockImage(StockID: LongInt; out Image, Mask: HBitmap): Boolean; override;
|
||||
{$if lcl_fullversion < 4990000}
|
||||
procedure DrawElement(DC: HDC; Details: TThemedElementDetails; const R: TRect; ClipRect: PRect = nil); override;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
{ TQtWidgetSetEx }
|
||||
|
|
@ -37,7 +40,11 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
SysUtils, Forms, Graphics, GraphUtil, qtobjects, qt6, DCStrUtils, DCUnix;
|
||||
SysUtils, Forms, Graphics, GraphUtil, qtobjects, qt6, DCStrUtils, DCUnix
|
||||
{$if lcl_fullversion < 4990000}
|
||||
, LCLIntf, TmSchema
|
||||
{$endif}
|
||||
;
|
||||
|
||||
{ TQtThemeServicesEx }
|
||||
|
||||
|
|
@ -46,6 +53,21 @@ begin
|
|||
Result:= False;
|
||||
end;
|
||||
|
||||
{$if lcl_fullversion < 4990000}
|
||||
procedure TQtThemeServicesEx.DrawElement(DC: HDC; Details: TThemedElementDetails; const R: TRect; ClipRect: PRect);
|
||||
var
|
||||
ARect: TRect;
|
||||
begin
|
||||
inherited DrawElement(DC, Details, R, ClipRect);
|
||||
|
||||
if (Details.Element = teToolBar) and (Details.Part = TP_SPLITBUTTONDROPDOWN) then
|
||||
begin
|
||||
ARect:= R;
|
||||
DrawText(DC, Details, '▾', ARect, DT_CENTER or DT_VCENTER or DT_SINGLELINE, 0);
|
||||
end;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
{ TQtWidgetSetEx }
|
||||
|
||||
function TQtWidgetSetEx.CreateThemeServices: TThemeServices;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue