|
@@ -3,7 +3,7 @@
|
|
-------------------------------------------------------------------------
|
|
-------------------------------------------------------------------------
|
|
Some useful functions for Unix icon theme implementation
|
|
Some useful functions for Unix icon theme implementation
|
|
|
|
|
|
- Copyright (C) 2009-2021 Alexander Koblov ([email protected])
|
|
|
|
|
|
+ Copyright (C) 2009-2023 Alexander Koblov ([email protected])
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
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
|
|
it under the terms of the GNU General Public License as published by
|
|
@@ -39,7 +39,23 @@ implementation
|
|
|
|
|
|
uses
|
|
uses
|
|
Laz2_DOM, Laz2_XMLRead, DCClassesUtf8, uMyUnix, DCOSUtils, uOSUtils, uGio,
|
|
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;
|
|
function GetKdeIconTheme: String;
|
|
var
|
|
var
|
|
@@ -192,7 +208,11 @@ begin
|
|
Result:= EmptyStr;
|
|
Result:= EmptyStr;
|
|
case DesktopEnv of
|
|
case DesktopEnv of
|
|
DE_UNKNOWN:
|
|
DE_UNKNOWN:
|
|
|
|
+{$IF DEFINED(LCLQT5) OR DEFINED(LCLQT6)}
|
|
|
|
+ Result:= GetQtIconTheme;
|
|
|
|
+{$ELSE}
|
|
Result:= DEFAULT_THEME_NAME;
|
|
Result:= DEFAULT_THEME_NAME;
|
|
|
|
+{$ENDIF}
|
|
DE_KDE:
|
|
DE_KDE:
|
|
Result:= GetKdeIconTheme;
|
|
Result:= GetKdeIconTheme;
|
|
DE_GNOME:
|
|
DE_GNOME:
|