Display visual corner radius in status bar

Before this change the corner radius displayed in the status bar was
just the latest corner radius set
This commit is contained in:
Martín Capello 2025-09-11 11:22:44 -03:00
parent abf43645da
commit 6e0358073f
1 changed files with 3 additions and 1 deletions

View File

@ -294,7 +294,9 @@ public:
}
if (hasCornerRadius()) {
text += fmt::format(" :corner_radius: {}", m_cornerRadius);
int maxRadius = std::min(ABS(stroke[1].x - stroke[0].x), ABS(stroke[1].y - stroke[0].y)) / 2;
int cornerRadius = std::min(m_cornerRadius, maxRadius);
text += fmt::format(" :corner_radius: {}", cornerRadius);
}
// Aspect ratio at the end