summaryrefslogtreecommitdiff
path: root/src/gui/widgets/colorpage.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/gui/widgets/colorpage.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/gui/widgets/colorpage.cpp')
-rw-r--r--src/gui/widgets/colorpage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp
index 078f5bb48..a668f2d6f 100644
--- a/src/gui/widgets/colorpage.cpp
+++ b/src/gui/widgets/colorpage.cpp
@@ -36,11 +36,11 @@ ColorPage::ColorPage(const Widget2 *const widget,
mItemPadding = mSkin ? mSkin->getOption("itemPadding") : 1;
mRowHeight = 13;
const Font *const font = getFont();
- mRowHeight = static_cast<unsigned int>(font->getHeight() +
+ mRowHeight = CAST_U32(font->getHeight() +
2 * mItemPadding);
if (mListModel)
{
- setHeight(static_cast<int>(getRowHeight()) *
+ setHeight(CAST_S32(getRowHeight()) *
mListModel->getNumberOfElements()
+ 2 * mPadding + 20);
}
@@ -57,11 +57,11 @@ void ColorPage::draw(Graphics *graphics)
const ColorModel *const model = static_cast<ColorModel* const>(
mListModel);
- mHighlightColor.a = static_cast<unsigned int>(mAlpha * 255.0F);
+ mHighlightColor.a = CAST_U32(mAlpha * 255.0F);
updateAlpha();
Font *const font = getFont();
- const int rowHeight = static_cast<int>(getRowHeight());
+ const int rowHeight = CAST_S32(getRowHeight());
const int width = mDimension.width;
if (mSelected >= 0)
@@ -115,7 +115,7 @@ void ColorPage::adjustSize()
BLOCK_START("ColorPage::adjustSize")
if (mListModel)
{
- setHeight(static_cast<int>(getRowHeight()) *
+ setHeight(CAST_S32(getRowHeight()) *
mListModel->getNumberOfElements() +
2 * mPadding + 20);
}