mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2024-12-22 18:29:48 +01:00
parent
6a92473237
commit
7bd0d55aa2
1 changed files with 10 additions and 7 deletions
|
@ -491,12 +491,15 @@ static Hyprlang::CParseResult parseDefineSize(const char* C, const char* V) {
|
|||
|
||||
image.filename = RHS;
|
||||
|
||||
if (!image.filename.ends_with(".svg")) {
|
||||
try {
|
||||
image.size = std::stoull(LHS);
|
||||
} catch (std::exception& e) {
|
||||
result.setError(e.what());
|
||||
return result;
|
||||
}
|
||||
} else
|
||||
image.size = 0;
|
||||
|
||||
currentTheme->shapes.back()->images.push_back(image);
|
||||
|
||||
|
@ -633,7 +636,7 @@ std::optional<std::string> CHyprcursorImplementation::loadTheme() {
|
|||
// load image
|
||||
Debug::log(TRACE, "Loading {} for shape {}", i.filename, cursor.path().stem().string());
|
||||
auto* IMAGE = LOADEDSHAPE.images.emplace_back(std::make_unique<SLoadedCursorImage>()).get();
|
||||
IMAGE->side = i.size;
|
||||
IMAGE->side = SHAPE->shapeType == SHAPE_SVG ? 0 : i.size;
|
||||
IMAGE->delay = i.delay;
|
||||
IMAGE->isSVG = SHAPE->shapeType == SHAPE_SVG;
|
||||
|
||||
|
|
Loading…
Reference in a new issue