Make handle-bars the same legth by using the smallest sprite dimesion

This commit is contained in:
asqude 2025-07-01 19:12:16 +02:00
parent ecc53c7c35
commit 8db26a384c
1 changed files with 5 additions and 4 deletions

View File

@ -917,16 +917,17 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g,
bottomRight);
}
if (mode & int(app::gen::SymmetryMode::POINT)) {
int smallestDimension = std::min(enclosingRect.w, enclosingRect.h);
g->drawHLine(
symmetryButtons & int(app::gen::SymmetryMode::POINT) ? color : semiTransparentColor,
enclosingRect.x + x - enclosingRect.w * 0.10f,
enclosingRect.x + x - smallestDimension * 0.10f,
enclosingRect.y + y,
enclosingRect.w * 0.10f * 2.0f);
smallestDimension * 0.10f * 2.0f);
g->drawVLine(
(symmetryButtons & int(app::gen::SymmetryMode::POINT)) ? color : semiTransparentColor,
enclosingRect.x + x,
enclosingRect.y + y - enclosingRect.h * 0.10f,
enclosingRect.h * 0.10f * 2.0f);
enclosingRect.y + y - smallestDimension * 0.10f,
smallestDimension * 0.10f * 2.0f);
}
}
}