Код: Выделить всё
function TThemeNotifier.GetSystemMode: TThemeMode;
var
LService: IFMXSystemAppearanceService;
begin
Result := TThemeMode.Light;
if TPlatformServices.Current.SupportsPlatformService(IFMXSystemAppearanceService, LService) then
begin
// always get LService.GetSystemThemeKind = Light
if LService.GetSystemThemeKind = TSystemThemeKind.Dark then
Result := TThemeMode.Dark;
end;
end;
Подробнее здесь: https://stackoverflow.com/questions/798 ... ing-delphi
Мобильная версия