Skip to content

Commit

Permalink
stuf
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Dec 18, 2024
1 parent f8de2a6 commit 3d3e8ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions libhyprcursor/hyprcursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,11 @@ std::optional<std::string> CHyprcursorImplementation::loadTheme() {
if (SHAPE->images.empty())
return "meta invalid: no images for shape " + cursor.path().stem().string();

SHAPE->directory = cursor.path().stem().string();
SHAPE->hotspotX = meta.parsedData.hotspotX;
SHAPE->hotspotY = meta.parsedData.hotspotY;
SHAPE->resizeAlgo = stringToAlgo(meta.parsedData.resizeAlgo);
SHAPE->directory = cursor.path().stem().string();
SHAPE->hotspotX = meta.parsedData.hotspotX;
SHAPE->hotspotY = meta.parsedData.hotspotY;
SHAPE->nominalSize = meta.parsedData.nominalSize;
SHAPE->resizeAlgo = stringToAlgo(meta.parsedData.resizeAlgo);

zip_discard(zip);
}
Expand Down
8 changes: 4 additions & 4 deletions libhyprcursor/meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ std::optional<std::string> CMeta::parseHL() {
return RESULT.getError();
} catch (const char* err) { return "failed parsing meta: " + std::string{err}; }

parsedData.hotspotX = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("hotspot_x"));
parsedData.hotspotY = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("hotspot_y"));
parsedData.hotspotY = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("nominal_size"));
parsedData.resizeAlgo = std::any_cast<Hyprlang::STRING>(meta->getConfigValue("resize_algorithm"));
parsedData.hotspotX = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("hotspot_x"));
parsedData.hotspotY = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("hotspot_y"));
parsedData.nominalSize = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("nominal_size"));
parsedData.resizeAlgo = std::any_cast<Hyprlang::STRING>(meta->getConfigValue("resize_algorithm"));

return {};
}
Expand Down
2 changes: 1 addition & 1 deletion tests/full_rendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int main(int argc, char** argv) {
/*
Create a manager. You can optionally pass a logger function.
*/
Hyprcursor::CHyprcursorManager mgr(nullptr, logFunction);
Hyprcursor::CHyprcursorManager mgr("HyprBibataModernClassicSVG", logFunction);

/*
Manager could be invalid if no themes were found, or
Expand Down

0 comments on commit 3d3e8ad

Please sign in to comment.