GH-378 add a resource search path to custom themes
This allows adding images and other bits and pieces to themes.
This commit is contained in:
@ -128,10 +128,11 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QString folder)
|
||||
{
|
||||
m_id = folder;
|
||||
QString path = FS::PathCombine("themes", m_id);
|
||||
QString pathResources = FS::PathCombine("themes", m_id, "resources");
|
||||
|
||||
qDebug() << "Loading theme" << m_id;
|
||||
|
||||
if(!FS::ensureFolderPathExists(path))
|
||||
if(!FS::ensureFolderPathExists(path) || !FS::ensureFolderPathExists(pathResources))
|
||||
{
|
||||
qWarning() << "couldn't create folder for theme!";
|
||||
m_palette = baseTheme->colorScheme();
|
||||
@ -191,6 +192,12 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QString folder)
|
||||
}
|
||||
}
|
||||
|
||||
QStringList CustomTheme::searchPaths()
|
||||
{
|
||||
return { FS::PathCombine("themes", m_id, "resources") };
|
||||
}
|
||||
|
||||
|
||||
QString CustomTheme::id()
|
||||
{
|
||||
return m_id;
|
||||
|
Reference in New Issue
Block a user