summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-24 01:07:46 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-24 01:07:46 +0300
commitb717426195ce73de9a70412a1e40fb01898264ae (patch)
treedb2d44f23f100cf4ee8cf94a2081e36f824b50f0 /src/gui
parent43aa8e6bedff642ba584c447c03886c1f0c52aac (diff)
downloadmanaverse-b717426195ce73de9a70412a1e40fb01898264ae.tar.gz
manaverse-b717426195ce73de9a70412a1e40fb01898264ae.tar.bz2
manaverse-b717426195ce73de9a70412a1e40fb01898264ae.tar.xz
manaverse-b717426195ce73de9a70412a1e40fb01898264ae.zip
Remove default parameters from vertcontainer.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/setupitem.cpp4
-rw-r--r--src/gui/widgets/statspage.cpp4
-rw-r--r--src/gui/widgets/statspagebasic.cpp6
-rw-r--r--src/gui/widgets/vertcontainer.h12
4 files changed, 14 insertions, 12 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index abe67d746..9a2bb663f 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -245,7 +245,7 @@ void SetupItemCheckBox::createControls()
mCheckBox = new CheckBox(this, mText, mValue != "0", mParent, mEventName);
mCheckBox->setToolTip(mDescription);
mWidget = mCheckBox;
- mParent->getContainer()->add1(mWidget);
+ mParent->getContainer()->add1(mWidget, -1);
mParent->addControl(this);
mParent->addActionListener(this);
mWidget->addActionListener(this);
@@ -618,7 +618,7 @@ void SetupItemLabel::createControls()
mLabel->setToolTip(mDescription);
mWidget = mLabel;
- mParent->getContainer()->add1(mWidget);
+ mParent->getContainer()->add1(mWidget, -1);
mParent->addControl(this);
mParent->addActionListener(this);
mWidget->addActionListener(this);
diff --git a/src/gui/widgets/statspage.cpp b/src/gui/widgets/statspage.cpp
index 0540b1a24..b09e4c563 100644
--- a/src/gui/widgets/statspage.cpp
+++ b/src/gui/widgets/statspage.cpp
@@ -38,7 +38,7 @@ StatsPage::StatsPage(const Widget2 *const widget,
AttributeListener(),
StatListener(),
mAttrs(),
- mAttrCont(new VertContainer(this, 32)),
+ mAttrCont(new VertContainer(this, 32, true, 0)),
mAttrScroll(new ScrollArea(this, mAttrCont, Opaque_false))
{
addWidgetListener(this);
@@ -59,7 +59,7 @@ StatsPage::StatsPage(const Widget2 *const widget,
stat.name,
stat.tag);
disp->update();
- mAttrCont->add2(disp, true);
+ mAttrCont->add2(disp, true, -1);
mAttrs[stat.attr] = disp;
}
}
diff --git a/src/gui/widgets/statspagebasic.cpp b/src/gui/widgets/statspagebasic.cpp
index 249d4f337..c55991565 100644
--- a/src/gui/widgets/statspagebasic.cpp
+++ b/src/gui/widgets/statspagebasic.cpp
@@ -41,7 +41,7 @@ StatsPageBasic::StatsPageBasic(const Widget2 *const widget) :
AttributeListener(),
StatListener(),
mAttrs(),
- mAttrCont(new VertContainer(this, 32)),
+ mAttrCont(new VertContainer(this, 32, true, 0)),
mAttrScroll(new ScrollArea(this, mAttrCont, Opaque_false)),
mCharacterPointsLabel(new Label(this, "C"))
{
@@ -63,7 +63,7 @@ StatsPageBasic::StatsPageBasic(const Widget2 *const widget) :
stat.name,
stat.tag);
disp->update();
- mAttrCont->add2(disp, true);
+ mAttrCont->add2(disp, true, -1);
mAttrs[stat.attr] = disp;
}
@@ -71,7 +71,7 @@ StatsPageBasic::StatsPageBasic(const Widget2 *const widget) :
mCharacterPointsLabel->setCaption(strprintf(_("Character points: %d"),
PlayerInfo::getAttribute(Attributes::PLAYER_CHAR_POINTS)));
mCharacterPointsLabel->adjustSize();
- mAttrCont->add1(mCharacterPointsLabel);
+ mAttrCont->add1(mCharacterPointsLabel, -1);
}
void StatsPageBasic::widgetResized(const Event &event A_UNUSED)
diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h
index c0dd118cf..ddca88652 100644
--- a/src/gui/widgets/vertcontainer.h
+++ b/src/gui/widgets/vertcontainer.h
@@ -39,15 +39,17 @@ class VertContainer final : public Container,
public:
VertContainer(const Widget2 *const widget,
const int verticalItemSize,
- const bool resizable = true,
- const int leftSpacing = 0);
+ const bool resizable,
+ const int leftSpacing);
A_DELETE_COPY(VertContainer)
- void add2(Widget *const widget, const bool resizable,
- const int spacing = -1);
+ void add2(Widget *const widget,
+ const bool resizable,
+ const int spacing);
- void add1(Widget *const widget, const int spacing = -1);
+ void add1(Widget *const widget,
+ const int spacing);
void clear() override final;