From e3682e2cdcb59c36792f6f9c39569e0af01088f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 May 2015 01:58:52 +0300 Subject: Dont set global color variables before drawing text. This allow not set actual OpenGL color on each call because it useless for drawing text. --- src/gui/widgets/progressbar.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/progressbar.cpp') diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 2692363f4..9acb8386c 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -278,9 +278,12 @@ void ProgressBar::render(Graphics *graphics) const int textX = mDimension.width / 2; const int textY = (mDimension.height - font->getHeight()) / 2; - graphics->setColorAll(mForegroundColor, mForegroundColor2); - font->drawString(graphics, mText, textX - - font->getWidth(mText) / 2, textY); + font->drawString(graphics, + mForegroundColor, + mForegroundColor2, + mText, + textX - font->getWidth(mText) / 2, + textY); graphics->setColor(oldColor); } -- cgit v1.2.3-70-g09d2