1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Make sure bar draw quad is thick enough

This commit is contained in:
Andrei Zavatski 2023-11-06 21:13:36 +03:00
parent 9d10d93085
commit b092b0093a

View File

@ -145,6 +145,13 @@ namespace osu.Game.Graphics.UserInterface
float barHeight = drawSize.Y * ((direction == BarDirection.TopToBottom || direction == BarDirection.BottomToTop) ? lengths[i] : barBreadth);
float barWidth = drawSize.X * ((direction == BarDirection.LeftToRight || direction == BarDirection.RightToLeft) ? lengths[i] : barBreadth);
if (barHeight == 0 || barWidth == 0)
continue;
// Make sure draw quad is thick enough
barHeight = Math.Max(barHeight, 1.5f);
barWidth = Math.Max(barWidth, 1.5f);
Vector2 topLeft;
switch (direction)