mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Enable dark mode (limited) under unsupported Windows versions
This commit is contained in:
parent
490e2604e6
commit
4cf98dccdc
3 changed files with 12 additions and 5 deletions
|
|
@ -416,9 +416,12 @@ var
|
|||
Handle: HWND;
|
||||
AWindow: QWidgetH;
|
||||
begin
|
||||
Handle:= GetWindowHandle(Form);
|
||||
AllowDarkModeForWindow(Handle, True);
|
||||
RefreshTitleBarThemeColor(Handle);
|
||||
if g_darkModeSupported then
|
||||
begin
|
||||
Handle:= GetWindowHandle(Form);
|
||||
AllowDarkModeForWindow(Handle, True);
|
||||
RefreshTitleBarThemeColor(Handle);
|
||||
end;
|
||||
|
||||
if (Form is THintWindow) then
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ var
|
|||
end;
|
||||
|
||||
begin
|
||||
if not g_darkModeEnabled then Exit;
|
||||
g_darkModeEnabled:= True;
|
||||
|
||||
QApplication_setStyle(QStyleFactory_create(@StyleName));
|
||||
|
||||
|
|
|
|||
|
|
@ -341,7 +341,11 @@ begin
|
|||
|
||||
{$IF DEFINED(MSWINDOWS) and DEFINED(LCLQT5)}
|
||||
if g_darkModeEnabled then
|
||||
ShowFlags:= ShowFlags or lcp_darkmode or lcp_darkmodenative;
|
||||
begin
|
||||
ShowFlags:= ShowFlags or lcp_darkmode;
|
||||
if g_darkModeSupported then
|
||||
ShowFlags:= ShowFlags or lcp_darkmodenative;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
if Assigned(ListLoadW) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue