summaryrefslogtreecommitdiff
path: root/src/gui/widgets/extendedlistbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 01:53:51 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 01:53:51 +0300
commit2492b561385859b7ef76fe816a8dc845f0b9bd09 (patch)
tree62633f8cd7c027c2a8e1bae61264a79394aeb751 /src/gui/widgets/extendedlistbox.cpp
parentce14a018a6f66aa1309ebe71a8217082d83cd0da (diff)
downloadplus-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.gz
plus-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.bz2
plus-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.xz
plus-2492b561385859b7ef76fe816a8dc845f0b9bd09.zip
Fix some casts between signed and unsigned in some files.
Diffstat (limited to 'src/gui/widgets/extendedlistbox.cpp')
-rw-r--r--src/gui/widgets/extendedlistbox.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index 2af16caf3..23daafb8e 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -31,7 +31,7 @@
ExtendedListBox::ExtendedListBox(const Widget2 *const widget,
ListModel *const listModel,
const std::string &skin,
- const int rowHeight) :
+ const unsigned int rowHeight) :
ListBox(widget, listModel, skin),
mImagePadding(mSkin ? mSkin->getOption("imagePadding") : 0),
mSpacing(mSkin ? mSkin->getOption("spacing") : 0),
@@ -59,7 +59,7 @@ void ExtendedListBox::draw(Graphics *graphics)
updateAlpha();
Font *const font = getFont();
- const int height = mRowHeight;
+ const int height = static_cast<int>(mRowHeight);
const int pad2 = 2 + mPadding;
const int width = mDimension.width;
int textPos = (height - font->getHeight()) / 2 + mPadding;
@@ -130,7 +130,7 @@ void ExtendedListBox::draw(Graphics *graphics)
if (minY != -1)
{
- mHighlightColor.a = static_cast<int>(mAlpha * 255.0F);
+ mHighlightColor.a = static_cast<unsigned int>(mAlpha * 255.0F);
graphics->setColor(mHighlightColor);
graphics->fillRectangle(Rect(mPadding, minY + mPadding,
width - pad2, maxY - minY + height));
@@ -233,7 +233,7 @@ int ExtendedListBox::getSelectionByMouse(const int y) const
if (mListItems.empty() && mSelectedItems.empty())
return ListBox::getSelectionByMouse(y);
- const int height = mRowHeight;
+ const int height = static_cast<int>(mRowHeight);
const size_t itemsSz = mListItems.size();
for (size_t f = 0; f < itemsSz; f ++)
{