diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-17 19:07:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-17 19:07:25 +0300 |
commit | e9fb9da5bf17d3402781eb5205be7d2f794887ee (patch) | |
tree | 729a7932fab668bcc2de180ebfe287e811f8e136 /src/gui/widgets/scrollarea.cpp | |
parent | 00ec60c1c0c3db8e3602e85dd152106f59f0c0e2 (diff) | |
download | manaverse-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.gz manaverse-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.bz2 manaverse-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.xz manaverse-e9fb9da5bf17d3402781eb5205be7d2f794887ee.zip |
Add strong typed bool Opaque.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index bd386f820..18b99527d 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -103,7 +103,7 @@ static std::string const buttonFiles[2] = ScrollArea::ScrollArea(Widget2 *const widget2, Widget *const widget, - const bool opaque, + const Opaque opaque, const std::string &skin) : BasicContainer(widget2), MouseListener(), @@ -137,7 +137,7 @@ ScrollArea::ScrollArea(Widget2 *const widget2, mRightButtonPressed(false), mIsVerticalMarkerDragged(false), mIsHorizontalMarkerDragged(false), - mOpaque(true), + mOpaque(Opaque_true), mHasMouse(false) { setContent(widget); @@ -320,7 +320,7 @@ void ScrollArea::draw(Graphics *const graphics) BLOCK_START("ScrollArea::draw") if (mVBarVisible || mHBarVisible) { - if (!mOpaque) + if (mOpaque == Opaque_false) updateCalcFlag(graphics); // need add caching or remove calc calls. // if (mRedraw) @@ -430,7 +430,7 @@ void ScrollArea::updateCalcFlag(const Graphics *const graphics) void ScrollArea::drawFrame(Graphics *const graphics) { BLOCK_START("ScrollArea::drawFrame") - if (mOpaque) + if (mOpaque == Opaque_true) { const int bs = mFrameSize * 2; const int w = mDimension.width + bs; @@ -455,7 +455,7 @@ void ScrollArea::drawFrame(Graphics *const graphics) void ScrollArea::safeDrawFrame(Graphics *const graphics) { BLOCK_START("ScrollArea::drawFrame") - if (mOpaque) + if (mOpaque == Opaque_true) { const int bs = mFrameSize * 2; const int w = mDimension.width + bs; @@ -469,10 +469,10 @@ void ScrollArea::safeDrawFrame(Graphics *const graphics) BLOCK_END("ScrollArea::drawFrame") } -void ScrollArea::setOpaque(bool opaque) +void ScrollArea::setOpaque(Opaque opaque) { mOpaque = opaque; - setFrameSize(mOpaque ? 2 : 0); + setFrameSize(mOpaque == Opaque_true ? 2 : 0); } Image *ScrollArea::getImageByState(Rect &dim, const BUTTON_DIR dir) |