This commit is contained in:
jpirnay
2026-05-20 19:35:34 +02:00
parent 59e6281f2e
commit d729201321
+1 -2
View File
@@ -87,8 +87,7 @@ WrappedLabel wrapLabel(const GfxRenderer& renderer, const char* label, int maxWi
// until label + "…" fits. // until label + "…" fits.
const int ellipsisW = renderer.getTextWidth(fontId, ""); const int ellipsisW = renderer.getTextWidth(fontId, "");
std::string truncated = s; std::string truncated = s;
while (!truncated.empty() && while (!truncated.empty() && renderer.getTextWidth(fontId, truncated.c_str()) + ellipsisW > maxWidth) {
renderer.getTextWidth(fontId, truncated.c_str()) + ellipsisW > maxWidth) {
truncated.pop_back(); truncated.pop_back();
} }
out.line1 = truncated + ""; out.line1 = truncated + "";