File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131#include " uithememanager.h"
3232
3333#include < QApplication>
34+ #include < QCoreApplication>
3435#include < QPalette>
3536#include < QPixmapCache>
3637#include < QResource>
@@ -56,6 +57,14 @@ namespace
5657 const QColor &color = palette.color (QPalette::Active, QPalette::Base);
5758 return (color.lightness () < 127 );
5859 }
60+
61+ Path resolveThemePath (const Path &themePath)
62+ {
63+ if (themePath.isAbsolute ())
64+ return themePath;
65+
66+ return (Path (QCoreApplication::applicationDirPath ()) / themePath);
67+ }
5968}
6069
6170UIThemeManager *UIThemeManager::m_instance = nullptr ;
@@ -100,7 +109,7 @@ UIThemeManager::UIThemeManager()
100109
101110 if (m_useCustomTheme)
102111 {
103- const Path themePath = Preferences::instance ()->customUIThemePath ();
112+ const Path themePath = resolveThemePath ( Preferences::instance ()->customUIThemePath () );
104113
105114 if (themePath.hasExtension (u" .qbtheme" _s))
106115 {
You can’t perform that action at this time.
0 commit comments