diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-15 22:21:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-15 22:21:02 +0300 |
commit | ca9fac131283ed536971799bef0d1fff4ef8adc1 (patch) | |
tree | ec70584d20b117c5d2446ef42b898eeacdda9d12 /src/gui/widgets/listbox.cpp | |
parent | 29f929794c7519b049de0be3af635f05d7e83be6 (diff) | |
download | plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2 plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip |
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/listbox.cpp')
-rw-r--r-- | src/gui/widgets/listbox.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index 0a7956476..e71907f37 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -106,7 +106,6 @@ void ListBox::draw(Graphics *graphics) BLOCK_START("ListBox::draw") updateAlpha(); - Graphics *const g = static_cast<Graphics*>(graphics); mHighlightColor.a = static_cast<int>(mAlpha * 255.0F); graphics->setColor(mHighlightColor); @@ -123,7 +122,7 @@ void ListBox::draw(Graphics *graphics) rowHeight * mSelected + mPadding, mDimension.width - 2 * mPadding, rowHeight)); - g->setColorAll(mForegroundSelectedColor, + graphics->setColorAll(mForegroundSelectedColor, mForegroundSelectedColor2); const std::string str = mListModel->getElementAt(mSelected); font->drawString(graphics, str, @@ -131,7 +130,7 @@ void ListBox::draw(Graphics *graphics) mSelected * rowHeight + mPadding + mItemPadding); } // Draw the list elements - g->setColorAll(mForegroundColor, mForegroundColor2); + graphics->setColorAll(mForegroundColor, mForegroundColor2); const int sz = mListModel->getNumberOfElements(); for (int i = 0, y = mPadding + mItemPadding; i < sz; ++i, y += rowHeight) @@ -153,14 +152,14 @@ void ListBox::draw(Graphics *graphics) rowHeight * mSelected + mPadding, mDimension.width - 2 * mPadding, rowHeight)); - g->setColorAll(mForegroundSelectedColor, + graphics->setColorAll(mForegroundSelectedColor, mForegroundSelectedColor2); const std::string str = mListModel->getElementAt(mSelected); font->drawString(graphics, str, mPadding, mSelected * rowHeight + mPadding + mItemPadding); } // Draw the list elements - g->setColorAll(mForegroundColor, mForegroundColor2); + graphics->setColorAll(mForegroundColor, mForegroundColor2); const int sz = mListModel->getNumberOfElements(); for (int i = 0, y = mPadding + mItemPadding; i < sz; ++i, y += rowHeight) |