From d8abec8cfce526f9b4779b674b172514100d01a2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 24 Dec 2017 01:21:54 +0300 Subject: Remove default parameters from scrollarea. --- src/gui/popups/popupmenu.cpp | 3 ++- src/gui/widgets/popuplist.cpp | 2 +- src/gui/widgets/scrollarea.h | 4 ++-- src/gui/widgets/statspage.cpp | 2 +- src/gui/widgets/statspagebasic.cpp | 2 +- src/gui/widgets/tabs/chat/chattab.cpp | 3 ++- src/gui/widgets/tabs/setup_relations.cpp | 3 ++- src/gui/widgets/tabs/setuptabscroll.cpp | 2 +- src/gui/windows/shortcutwindow.cpp | 7 +++++-- src/gui/windows/skilldialog.cpp | 9 ++++++--- src/gui/windows/whoisonline.cpp | 3 ++- 11 files changed, 25 insertions(+), 15 deletions(-) (limited to 'src/gui') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 237443230..1a810245d 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -136,7 +136,8 @@ PopupMenu::PopupMenu() : mPlayerListener.setNick(""); mPlayerListener.setDialog(nullptr); mPlayerListener.setType(ActorType::Unknown); - mScrollArea = new ScrollArea(this, mBrowserBox, Opaque_false); + mScrollArea = new ScrollArea(this, + mBrowserBox, Opaque_false, std::string()); mScrollArea->setVerticalScrollPolicy(ScrollArea::SHOW_AUTO); addMouseListener(this); } diff --git a/src/gui/widgets/popuplist.cpp b/src/gui/widgets/popuplist.cpp index 0260945ce..2a1dd95c7 100644 --- a/src/gui/widgets/popuplist.cpp +++ b/src/gui/widgets/popuplist.cpp @@ -42,7 +42,7 @@ PopupList::PopupList(DropDown *const widget, widget, listModel, "extendedlistbox.xml", 0) : CREATEWIDGETR(ListBox, widget, listModel, "popuplistbox.xml")), - mScrollArea(new ScrollArea(this, mListBox, Opaque_false)), + mScrollArea(new ScrollArea(this, mListBox, Opaque_false, std::string())), mDropDown(widget), mPressedIndex(-2), mModal(modal) diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h index 50b194d28..a2b6e0b78 100644 --- a/src/gui/widgets/scrollarea.h +++ b/src/gui/widgets/scrollarea.h @@ -110,8 +110,8 @@ class ScrollArea final : public BasicContainer, ScrollArea(Widget2 *const widget2, Widget *const widget, - const Opaque opaque = Opaque_true, - const std::string &skin = ""); + const Opaque opaque, + const std::string &skin); A_DELETE_COPY(ScrollArea) diff --git a/src/gui/widgets/statspage.cpp b/src/gui/widgets/statspage.cpp index b09e4c563..1bb78a381 100644 --- a/src/gui/widgets/statspage.cpp +++ b/src/gui/widgets/statspage.cpp @@ -39,7 +39,7 @@ StatsPage::StatsPage(const Widget2 *const widget, StatListener(), mAttrs(), mAttrCont(new VertContainer(this, 32, true, 0)), - mAttrScroll(new ScrollArea(this, mAttrCont, Opaque_false)) + mAttrScroll(new ScrollArea(this, mAttrCont, Opaque_false, std::string())) { addWidgetListener(this); setSelectable(false); diff --git a/src/gui/widgets/statspagebasic.cpp b/src/gui/widgets/statspagebasic.cpp index c55991565..b155b4829 100644 --- a/src/gui/widgets/statspagebasic.cpp +++ b/src/gui/widgets/statspagebasic.cpp @@ -42,7 +42,7 @@ StatsPageBasic::StatsPageBasic(const Widget2 *const widget) : StatListener(), mAttrs(), mAttrCont(new VertContainer(this, 32, true, 0)), - mAttrScroll(new ScrollArea(this, mAttrCont, Opaque_false)), + mAttrScroll(new ScrollArea(this, mAttrCont, Opaque_false, std::string())), mCharacterPointsLabel(new Label(this, "C")) { addWidgetListener(this); diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp index 3fc6fb252..64cae0ed3 100644 --- a/src/gui/widgets/tabs/chat/chattab.cpp +++ b/src/gui/widgets/tabs/chat/chattab.cpp @@ -71,7 +71,8 @@ ChatTab::ChatTab(const Widget2 *const widget, Tab(widget), mTextOutput(new BrowserBox(this, Opaque_true, "browserbox.xml")), - mScrollArea(new ScrollArea(this, mTextOutput, Opaque_false)), + mScrollArea(new ScrollArea(this, + mTextOutput, Opaque_false, std::string())), mChannelName(channel), mLogName(logName), mType(type), diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp index 4cc81a300..095277a75 100644 --- a/src/gui/widgets/tabs/setup_relations.cpp +++ b/src/gui/widgets/tabs/setup_relations.cpp @@ -67,7 +67,8 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) : mPlayerTableModel(new PlayerTableModel(this)), mPlayerTable(new GuiTable(this, mPlayerTableModel)), mPlayerTitleTable(new GuiTable(this, mPlayerTableTitleModel)), - mPlayerScrollArea(new ScrollArea(this, mPlayerTable)), + mPlayerScrollArea(new ScrollArea(this, + mPlayerTable, Opaque_true, std::string())), // TRANSLATORS: relation dialog button mDefaultTrading(new CheckBox(this, _("Allow trading"), (playerRelations.getDefault() & PlayerRelation::TRADE) != 0u)), diff --git a/src/gui/widgets/tabs/setuptabscroll.cpp b/src/gui/widgets/tabs/setuptabscroll.cpp index 0cb623687..6f44b17b8 100644 --- a/src/gui/widgets/tabs/setuptabscroll.cpp +++ b/src/gui/widgets/tabs/setuptabscroll.cpp @@ -31,7 +31,7 @@ SetupTabScroll::SetupTabScroll(const Widget2 *const widget) : SetupTab(widget), mContainer(new VertContainer(this, 25, false, 8)), - mScroll(new ScrollArea(this, mContainer, Opaque_false)), + mScroll(new ScrollArea(this, mContainer, Opaque_false, std::string())), mItems(), mAllItems(), mPreferredFirstItemSize(200) diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp index 1bb35d3f1..bff1efe58 100644 --- a/src/gui/windows/shortcutwindow.cpp +++ b/src/gui/windows/shortcutwindow.cpp @@ -54,7 +54,7 @@ ShortcutWindow::ShortcutWindow(const std::string &restrict title, int width, int height) : Window("Window", Modal_false, nullptr, skinFile), mItems(content), - mScrollArea(new ScrollArea(this, mItems, Opaque_false)), + mScrollArea(new ScrollArea(this, mItems, Opaque_false, std::string())), mTabs(nullptr), mPages(), mButtonIndex(0) @@ -171,7 +171,10 @@ void ShortcutWindow::addTab(const std::string &name, { if ((content == nullptr) || (mTabs == nullptr)) return; - ScrollArea *const scroll = new ScrollArea(this, content, Opaque_false); + ScrollArea *const scroll = new ScrollArea(this, + content, + Opaque_false, + std::string()); scroll->setPosition(SCROLL_PADDING, SCROLL_PADDING); scroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER); content->setWidget2(this); diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 114937b0b..347435fec 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -139,7 +139,8 @@ void SkillDialog::addDefaultTab() listbox->addActionListener(this); ScrollArea *const scroll = new ScrollArea(this, listbox, - Opaque_false); + Opaque_false, + std::string()); scroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER); scroll->setVerticalScrollPolicy(ScrollArea::SHOW_ALWAYS); // TRANSLATORS: unknown skills tab name @@ -401,7 +402,8 @@ void SkillDialog::loadXmlFile(const std::string &fileName, listbox->addActionListener(this); scroll = new ScrollArea(this, listbox, - Opaque_false); + Opaque_false, + std::string()); scroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER); scroll->setVerticalScrollPolicy(ScrollArea::SHOW_ALWAYS); tab = new SkillTab(this, setName, listbox); @@ -416,7 +418,8 @@ void SkillDialog::loadXmlFile(const std::string &fileName, listbox->addActionListener(this); scroll = new ScrollArea(this, listbox, - Opaque_false); + Opaque_false, + std::string()); scroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER); scroll->setVerticalScrollPolicy(ScrollArea::SHOW_ALWAYS); tab = new SkillTab(this, setName, listbox); diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 8e35fb141..0e506602f 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -104,7 +104,8 @@ WhoIsOnline::WhoIsOnline() : mCurlError(new char[CURL_ERROR_SIZE]), mBrowserBox(new StaticBrowserBox(this, Opaque_true, "onlinebrowserbox.xml")), - mScrollArea(new ScrollArea(this, mBrowserBox, Opaque_false)), + mScrollArea(new ScrollArea(this, + mBrowserBox, Opaque_false, std::string())), // TRANSLATORS: who is online. button. mUpdateButton(new Button(this, _("Update"), "update", this)), mOnlinePlayers(), -- cgit v1.2.3-60-g2f50