summaryrefslogtreecommitdiff
path: root/src/gui/widgets/colorpage.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/colorpage.cpp
parentce14a018a6f66aa1309ebe71a8217082d83cd0da (diff)
downloadmanaverse-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.gz
manaverse-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.bz2
manaverse-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.xz
manaverse-2492b561385859b7ef76fe816a8dc845f0b9bd09.zip
Fix some casts between signed and unsigned in some files.
Diffstat (limited to 'src/gui/widgets/colorpage.cpp')
-rw-r--r--src/gui/widgets/colorpage.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp
index 6c087663b..078f5bb48 100644
--- a/src/gui/widgets/colorpage.cpp
+++ b/src/gui/widgets/colorpage.cpp
@@ -36,10 +36,12 @@ ColorPage::ColorPage(const Widget2 *const widget,
mItemPadding = mSkin ? mSkin->getOption("itemPadding") : 1;
mRowHeight = 13;
const Font *const font = getFont();
- mRowHeight = font->getHeight() + 2 * mItemPadding;
+ mRowHeight = static_cast<unsigned int>(font->getHeight() +
+ 2 * mItemPadding);
if (mListModel)
{
- setHeight(getRowHeight() * mListModel->getNumberOfElements()
+ setHeight(static_cast<int>(getRowHeight()) *
+ mListModel->getNumberOfElements()
+ 2 * mPadding + 20);
}
}
@@ -55,11 +57,11 @@ void ColorPage::draw(Graphics *graphics)
const ColorModel *const model = static_cast<ColorModel* const>(
mListModel);
- mHighlightColor.a = static_cast<int>(mAlpha * 255.0F);
+ mHighlightColor.a = static_cast<unsigned int>(mAlpha * 255.0F);
updateAlpha();
Font *const font = getFont();
- const int rowHeight = getRowHeight();
+ const int rowHeight = static_cast<int>(getRowHeight());
const int width = mDimension.width;
if (mSelected >= 0)
@@ -113,8 +115,9 @@ void ColorPage::adjustSize()
BLOCK_START("ColorPage::adjustSize")
if (mListModel)
{
- setHeight(getRowHeight() * mListModel->getNumberOfElements()
- + 2 * mPadding + 20);
+ setHeight(static_cast<int>(getRowHeight()) *
+ mListModel->getNumberOfElements() +
+ 2 * mPadding + 20);
}
BLOCK_END("ColorPage::adjustSize")
}