From ea33c66681ccaef2ead76ea2b10ede307353c67e Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Mon, 9 Feb 2015 15:04:43 -0800 Subject: [PATCH 1/2] fix formating issue in performance stats --- interface/src/ui/Stats.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/interface/src/ui/Stats.cpp b/interface/src/ui/Stats.cpp index 2f08238c32..ca4a88600e 100644 --- a/interface/src/ui/Stats.cpp +++ b/interface/src/ui/Stats.cpp @@ -271,7 +271,7 @@ void Stats::display( // TODO: the display of these timing details should all be moved to JavaScript if (_expanded && Menu::getInstance()->isOptionChecked(MenuOption::DisplayTimingDetails)) { // Timing details... - verticalOffset += STATS_PELS_PER_LINE * 4; // skip 4 lines to be under the other columns + verticalOffset += STATS_PELS_PER_LINE * 6; // skip 6 lines to be under the other columns drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, "-------------------------------------------------------- Function " "------------------------------------------------------- --msecs- -calls--", color); @@ -294,13 +294,14 @@ void Stats::display( j.toBack(); while (j.hasPrevious()) { j.previous(); + QChar noBreakingSpace = QChar::Nbsp; QString functionName = j.value(); const PerformanceTimerRecord& record = allRecords.value(functionName); QString perfLine = QString("%1: %2 [%3]"). - arg(QString(qPrintable(functionName)), 120). - arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3). - arg(record.getCount(), 6); + arg(QString(qPrintable(functionName)), 120, noBreakingSpace). + arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3, noBreakingSpace). + arg((int)record.getCount(), 6, 10, noBreakingSpace); verticalOffset += STATS_PELS_PER_LINE; drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, perfLine.toUtf8().constData(), color); From 2f981686fab790cc844bab91e77948e153eed741 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Mon, 9 Feb 2015 15:38:50 -0800 Subject: [PATCH 2/2] fix bad colors on windows --- interface/src/Util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Util.cpp b/interface/src/Util.cpp index 44a6ec666a..da4ada2dc2 100644 --- a/interface/src/Util.cpp +++ b/interface/src/Util.cpp @@ -111,7 +111,7 @@ void drawText(int x, int y, float scale, float radians, int mono, glRotated(double(radians * DEGREES_PER_RADIAN), 0.0, 0.0, 1.0); glScalef(scale / 0.1f, scale / 0.1f, 1.0f); - glm::vec4 colorV4 = {color[0], color[1], color[3], 1.0f }; + glm::vec4 colorV4 = {color[0], color[1], color[2], 1.0f }; textRenderer(mono)->draw(0, 0, string, colorV4); glPopMatrix(); }