「ダークモード対応」の版間の差分

編集の要約なし
(Admin (トーク) による版 3913 を取り消し)
編集の要約なし
15行目: 15行目:
uses
uses
{$IF CompilerVersion > 22.9}
{$IF CompilerVersion > 22.9}
   Winapi.Windows, System.SysUtils, System.Classes, System.Math;
   Winapi.Windows, System.SysUtils;
{$ELSE}
{$ELSE}
   Windows, SysUtils, Classes, Math;
   Windows, SysUtils;
{$IFEND}
{$IFEND}


48行目: 48行目:
function DarkModeLoadLibrary: Boolean;
function DarkModeLoadLibrary: Boolean;
begin
begin
   if CheckWin32Version(10) and (TOSVersion.Build = 17763) then
   if CheckWin32Version(10) and (TOSVersion.Build >= 17763) then
     FHandle := LoadLibrary(PChar(THEME_LIB));
     FHandle := LoadLibrary(PChar(THEME_LIB));
   Result := FHandle <> 0;
   Result := FHandle <> 0;
61行目: 61行目:
       (@ShouldAppsUseDarkMode <> nil) and (@AllowDarkModeForWindow <> nil) and
       (@ShouldAppsUseDarkMode <> nil) and (@AllowDarkModeForWindow <> nil) and
       (@AllowDarkModeForApp <> nil) and (@FlushMenuThemes <> nil) then
       (@AllowDarkModeForApp <> nil) and (@FlushMenuThemes <> nil) then
    begin
      // AllowDarkModeForApp(True);
      // FlushMenuThemes;
       DarkModeSupported := True;
       DarkModeSupported := True;
    end;
   end;
   end;
end;
end;
スポンサーリンク