diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/itemcontainer.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 06e9fd459..0fbe84da9 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -123,7 +123,7 @@ class ItemContainer final : public Widget, void setSortType(const int sortType); - void setName(std::string str) + void setName(const std::string &str) { mName = str; } void updateMatrix(); 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 |