summaryrefslogtreecommitdiff
path: root/src/gui/widgets/scrollarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-07 17:54:05 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-07 17:54:05 +0300
commitb43451daa5dc7b2e352d084d45934cf71db7ae4f (patch)
tree1e636b067a19ca00fe757d2c287342b300058b29 /src/gui/widgets/scrollarea.cpp
parent5b1eaa9ce112d70f3b93699145858e6a33ab2a3b (diff)
downloadplus-b43451daa5dc7b2e352d084d45934cf71db7ae4f.tar.gz
plus-b43451daa5dc7b2e352d084d45934cf71db7ae4f.tar.bz2
plus-b43451daa5dc7b2e352d084d45934cf71db7ae4f.tar.xz
plus-b43451daa5dc7b2e352d084d45934cf71db7ae4f.zip
Add missing const.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r--src/gui/widgets/scrollarea.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 8761e3f7d..e006302c7 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -254,16 +254,13 @@ void ScrollArea::logic()
Widget *const content = getContent();
if (content)
{
- const int frameSize = content->getFrameSize();
+ unsigned int frameSize = content->getFrameSize();
content->setPosition(-mHScroll + frameSize, -mVScroll + frameSize);
content->logic();
- }
- // When no scrollbar in a certain direction, adapt content size to match
- // the content dimension exactly.
- if (content)
- {
- const unsigned int frameSize = 2 * content->getFrameSize();
+ // When no scrollbar in a certain direction,
+ // adapt content size to match the content dimension exactly.
+ frameSize = 2 * content->getFrameSize();
if (mHPolicy == ScrollArea::SHOW_NEVER)
{
content->setWidth((mVBarVisible ? (mDimension.width