summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-24 01:21:54 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-24 01:21:54 +0300
commitd8abec8cfce526f9b4779b674b172514100d01a2 (patch)
tree305c62d9503a1a508044883bcd336ea07d3c17f8 /src
parentb717426195ce73de9a70412a1e40fb01898264ae (diff)
downloadplus-d8abec8cfce526f9b4779b674b172514100d01a2.tar.gz
plus-d8abec8cfce526f9b4779b674b172514100d01a2.tar.bz2
plus-d8abec8cfce526f9b4779b674b172514100d01a2.tar.xz
plus-d8abec8cfce526f9b4779b674b172514100d01a2.zip
Remove default parameters from scrollarea.
Diffstat (limited to 'src')
-rw-r--r--src/gui/popups/popupmenu.cpp3
-rw-r--r--src/gui/widgets/popuplist.cpp2
-rw-r--r--src/gui/widgets/scrollarea.h4
-rw-r--r--src/gui/widgets/statspage.cpp2
-rw-r--r--src/gui/widgets/statspagebasic.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp3
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.cpp2
-rw-r--r--src/gui/windows/shortcutwindow.cpp7
-rw-r--r--src/gui/windows/skilldialog.cpp9
-rw-r--r--src/gui/windows/whoisonline.cpp3
11 files changed, 25 insertions, 15 deletions
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(),