This commit is contained in:
Vaxry 2024-12-18 15:57:24 +00:00
parent f8de2a65db
commit 3d3e8ad1e6
3 changed files with 10 additions and 9 deletions

View file

@ -778,10 +778,11 @@ std::optional<std::string> CHyprcursorImplementation::loadTheme() {
if (SHAPE->images.empty()) if (SHAPE->images.empty())
return "meta invalid: no images for shape " + cursor.path().stem().string(); return "meta invalid: no images for shape " + cursor.path().stem().string();
SHAPE->directory = cursor.path().stem().string(); SHAPE->directory = cursor.path().stem().string();
SHAPE->hotspotX = meta.parsedData.hotspotX; SHAPE->hotspotX = meta.parsedData.hotspotX;
SHAPE->hotspotY = meta.parsedData.hotspotY; SHAPE->hotspotY = meta.parsedData.hotspotY;
SHAPE->resizeAlgo = stringToAlgo(meta.parsedData.resizeAlgo); SHAPE->nominalSize = meta.parsedData.nominalSize;
SHAPE->resizeAlgo = stringToAlgo(meta.parsedData.resizeAlgo);
zip_discard(zip); zip_discard(zip);
} }

View file

@ -152,10 +152,10 @@ std::optional<std::string> CMeta::parseHL() {
return RESULT.getError(); return RESULT.getError();
} catch (const char* err) { return "failed parsing meta: " + std::string{err}; } } catch (const char* err) { return "failed parsing meta: " + std::string{err}; }
parsedData.hotspotX = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("hotspot_x")); 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("hotspot_y"));
parsedData.hotspotY = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("nominal_size")); parsedData.nominalSize = std::any_cast<Hyprlang::FLOAT>(meta->getConfigValue("nominal_size"));
parsedData.resizeAlgo = std::any_cast<Hyprlang::STRING>(meta->getConfigValue("resize_algorithm")); parsedData.resizeAlgo = std::any_cast<Hyprlang::STRING>(meta->getConfigValue("resize_algorithm"));
return {}; return {};
} }

View file

@ -17,7 +17,7 @@ int main(int argc, char** argv) {
/* /*
Create a manager. You can optionally pass a logger function. 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 Manager could be invalid if no themes were found, or