Finish things :P
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
39f7bea53e
commit
5088d33fd2
@ -25,7 +25,7 @@ IconTheme::IconTheme(const QString& id, const QString& path) : m_id(id), m_path(
|
|||||||
|
|
||||||
bool IconTheme::load()
|
bool IconTheme::load()
|
||||||
{
|
{
|
||||||
QString path = m_path + "/index.theme";
|
const QString path = m_path + "/index.theme";
|
||||||
|
|
||||||
if (!QFile::exists(path))
|
if (!QFile::exists(path))
|
||||||
return false;
|
return false;
|
||||||
|
@ -72,17 +72,12 @@ void ThemeManager::initializeIcons()
|
|||||||
{
|
{
|
||||||
// TODO: icon themes and instance icons do not mesh well together. Rearrange and fix discrepancies!
|
// TODO: icon themes and instance icons do not mesh well together. Rearrange and fix discrepancies!
|
||||||
// set icon theme search path!
|
// set icon theme search path!
|
||||||
|
themeDebugLog() << "<> Initializing Icon Themes";
|
||||||
if (!m_iconThemeFolder.mkpath("."))
|
|
||||||
themeWarningLog() << "Couldn't create icon theme folder";
|
|
||||||
themeDebugLog() << "Icon Theme Folder Path: " << m_iconThemeFolder.absolutePath();
|
|
||||||
|
|
||||||
auto searchPaths = QIcon::themeSearchPaths();
|
auto searchPaths = QIcon::themeSearchPaths();
|
||||||
searchPaths.append(m_iconThemeFolder.path());
|
searchPaths.append(m_iconThemeFolder.path());
|
||||||
QIcon::setThemeSearchPaths(searchPaths);
|
QIcon::setThemeSearchPaths(searchPaths);
|
||||||
|
|
||||||
themeDebugLog() << "<> Initializing Icon Themes";
|
|
||||||
|
|
||||||
for (const QString& id : builtinIcons) {
|
for (const QString& id : builtinIcons) {
|
||||||
IconTheme theme(id, QString(":/icons/%1").arg(id));
|
IconTheme theme(id, QString(":/icons/%1").arg(id));
|
||||||
if (!theme.load()) {
|
if (!theme.load()) {
|
||||||
@ -94,6 +89,10 @@ void ThemeManager::initializeIcons()
|
|||||||
themeDebugLog() << "Loaded Built-In Icon Theme" << id;
|
themeDebugLog() << "Loaded Built-In Icon Theme" << id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_iconThemeFolder.mkpath("."))
|
||||||
|
themeWarningLog() << "Couldn't create icon theme folder";
|
||||||
|
themeDebugLog() << "Icon Theme Folder Path: " << m_iconThemeFolder.absolutePath();
|
||||||
|
|
||||||
QDirIterator directoryIterator(m_iconThemeFolder.path(), QDir::Dirs | QDir::NoDotAndDotDot);
|
QDirIterator directoryIterator(m_iconThemeFolder.path(), QDir::Dirs | QDir::NoDotAndDotDot);
|
||||||
while (directoryIterator.hasNext()) {
|
while (directoryIterator.hasNext()) {
|
||||||
QDir dir(directoryIterator.next());
|
QDir dir(directoryIterator.next());
|
||||||
|
@ -167,12 +167,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
|
||||||
<tabstop>iconsComboBox</tabstop>
|
|
||||||
<tabstop>widgetStyleComboBox</tabstop>
|
|
||||||
<tabstop>backgroundCatComboBox</tabstop>
|
|
||||||
<tabstop>catInfoLabel</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user