Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .claude/autoharness/requests
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
59
Empty file.
5 changes: 5 additions & 0 deletions .serena/project.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file allows you to locally override settings in project.yml for development purposes.
#
# Use the same keys as in project.yml here. Any setting you specify will override the corresponding
# setting in project.yml, allowing you to customise the configuration for your local development environment
# without affecting the project configuration in project.yml (which is intended to be versioned).
13 changes: 9 additions & 4 deletions src/system/Icons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,22 @@ void CSystemIconFactory::parseTheme(const std::string& themeDir) {
directoriesEntry = THEME_DATA->find("\nDirectories =");

if (directoriesEntry != std::string::npos) {
const auto BASE_PATH = std::filesystem::path{themeDir};
const auto BASE_PATH = std::filesystem::path{themeDir};
const std::string THEME = BASE_PATH.filename().string();

size_t directoriesLineEnd = THEME_DATA->find('\n', directoriesEntry + 2);
directoriesEntry = THEME_DATA->find('=', directoriesEntry + 2) + 1;
size_t directoriesLineEnd = THEME_DATA->find('\n', directoriesEntry + 2);
directoriesEntry = THEME_DATA->find('=', directoriesEntry + 2) + 1;

std::string directoriesList = THEME_DATA->substr(directoriesEntry, directoriesLineEnd - directoriesEntry);

CConstVarList dirs(directoriesList, 0, ',', true);

// the index.theme lives in one base dir, but a theme's icon dirs can be spread across all of
// them: chromium drops PWA icons into ~/.local/share/icons/<theme>/<size>/apps with no
// index.theme there. add each listed dir under every base dir so those are found too.
for (const auto& d : dirs) {
m_lookupPaths.emplace_back(BASE_PATH / d);
for (const auto& rawBase : getXDGIconThemeDirs())
m_lookupPaths.emplace_back(std::filesystem::path{fromDir(rawBase.c_str())} / THEME / std::string{d});
}

g_logger->log(HT_LOG_TRACE, "CSystemIconFactory: theme {} has {} dirs", themeDir, dirs.size());
Expand Down
Loading