From 4871b1eeb08d217a36216880fe302a103cfdf881 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 30 Dec 2017 10:19:15 -0800 Subject: [PATCH] Profiler: Fix cat display on small screens. --- UI/ProfilerDraw.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/ProfilerDraw.cpp b/UI/ProfilerDraw.cpp index f90427df44..a4ffb8bbb3 100644 --- a/UI/ProfilerDraw.cpp +++ b/UI/ProfilerDraw.cpp @@ -94,6 +94,10 @@ void DrawProfile(UIContext &ui) { } legendWidth += 20.0f; + if (legendHeight > ui.GetBounds().h) { + legendHeight = ui.GetBounds().h; + } + float legendStartY = legendHeight > ui.GetBounds().centerY() ? ui.GetBounds().y2() - legendHeight : ui.GetBounds().centerY(); float legendStartX = ui.GetBounds().x2() - std::min(legendWidth, 200.0f);