Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/gui/uithememanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include "base/logger.h"
#include "base/path.h"
#include "base/profile.h"
#include "base/preferences.h"
#include "uithemecommon.h"

Expand All @@ -56,6 +57,11 @@ namespace
const QColor &color = palette.color(QPalette::Active, QPalette::Base);
return (color.lightness() < 127);
}

Path resolveThemePath(const Path &themePath)
{
return Profile::instance()->fromPortablePath(themePath);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe it is valid to use Profile::fromPortablePath() in this context. It was designed for another purposes.

}
}

UIThemeManager *UIThemeManager::m_instance = nullptr;
Expand Down Expand Up @@ -100,7 +106,7 @@ UIThemeManager::UIThemeManager()

if (m_useCustomTheme)
{
const Path themePath = Preferences::instance()->customUIThemePath();
const Path themePath = resolveThemePath(Preferences::instance()->customUIThemePath());

if (themePath.hasExtension(u".qbtheme"_s))
{
Expand Down
Loading