mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Get icon theme name from Qt (fixes #1023)
This commit is contained in:
parent
0dc158b75f
commit
1991eb36e2
1 changed files with 22 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Some useful functions for Unix icon theme implementation
|
||||
|
||||
Copyright (C) 2009-2021 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2009-2023 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -39,7 +39,23 @@ implementation
|
|||
|
||||
uses
|
||||
Laz2_DOM, Laz2_XMLRead, DCClassesUtf8, uMyUnix, DCOSUtils, uOSUtils, uGio,
|
||||
uSysFolders, uXdg;
|
||||
uSysFolders, uXdg
|
||||
{$IF DEFINED(LCLQT5)}
|
||||
, Qt5
|
||||
{$ELSEIF DEFINED(LCLQT6)}
|
||||
, Qt6
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
{$IF DEFINED(LCLQT5) OR DEFINED(LCLQT6)}
|
||||
function GetQtIconTheme: String;
|
||||
var
|
||||
AValue: WideString;
|
||||
begin
|
||||
QIcon_themeName(@AValue);
|
||||
Result:= UTF8Encode(AValue);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function GetKdeIconTheme: String;
|
||||
var
|
||||
|
|
@ -192,7 +208,11 @@ begin
|
|||
Result:= EmptyStr;
|
||||
case DesktopEnv of
|
||||
DE_UNKNOWN:
|
||||
{$IF DEFINED(LCLQT5) OR DEFINED(LCLQT6)}
|
||||
Result:= GetQtIconTheme;
|
||||
{$ELSE}
|
||||
Result:= DEFAULT_THEME_NAME;
|
||||
{$ENDIF}
|
||||
DE_KDE:
|
||||
Result:= GetKdeIconTheme;
|
||||
DE_GNOME:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue