summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-05 12:51:55 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-05 12:51:55 +0300
commit657a5b3dbbecbe000324579f1fc26f1519459057 (patch)
tree480f3f3dfa6b9cb74c7399d11b2a6e5a84993925 /src
parentf677e2a536d84c1db5145db80b9e9a7540cfbb6d (diff)
downloadplus-657a5b3dbbecbe000324579f1fc26f1519459057.tar.gz
plus-657a5b3dbbecbe000324579f1fc26f1519459057.tar.bz2
plus-657a5b3dbbecbe000324579f1fc26f1519459057.tar.xz
plus-657a5b3dbbecbe000324579f1fc26f1519459057.zip
use new control for scale.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/namesmodel.h3
-rw-r--r--src/gui/widgets/tabs/setup_visual.cpp10
-rw-r--r--src/gui/widgets/tabs/setup_visual.h2
3 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/widgets/namesmodel.h b/src/gui/widgets/namesmodel.h
index 76f668f10..c64c6ea26 100644
--- a/src/gui/widgets/namesmodel.h
+++ b/src/gui/widgets/namesmodel.h
@@ -49,6 +49,9 @@ class NamesModel : public gcn::ListModel
void clear()
{ mNames.clear(); }
+ void add(const std::string &str)
+ { mNames.push_back(str); }
+
void fillFromArray(const char *const *const arr, std::size_t size);
protected:
diff --git a/src/gui/widgets/tabs/setup_visual.cpp b/src/gui/widgets/tabs/setup_visual.cpp
index 8d79fdaa0..ac608f756 100644
--- a/src/gui/widgets/tabs/setup_visual.cpp
+++ b/src/gui/widgets/tabs/setup_visual.cpp
@@ -88,7 +88,7 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
mParticleList(new SetupItemNames),
mParticleTypeList(new NamesModel),
mVSyncList(new NamesModel),
- mScaleList(new SetupItemNames)
+ mScaleList(new NamesModel)
{
// TRANSLATORS: settings tab name
setName(_("Visual"));
@@ -105,11 +105,11 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
for (int f = 1; f <= 7; f ++)
{
// TRANSLATORS: particle details
- mScaleList->push_back(toString(f) + "x");
+ mScaleList->add(toString(f) + "x");
}
- new SetupItemSlider2(_("Scale "), "", "scale",
- this, "scaleEvent", 1, 7,
- mScaleList, true);
+ // TRANSLATORS: settings option
+ new SetupItemSliderInt(_("Scale"), "",
+ "scale", this, "scaleEvent", mScaleList, 1);
// TRANSLATORS: settings option
new SetupItemLabel(_("Notifications"), "", this);
diff --git a/src/gui/widgets/tabs/setup_visual.h b/src/gui/widgets/tabs/setup_visual.h
index 8aef0d294..2d40d3a08 100644
--- a/src/gui/widgets/tabs/setup_visual.h
+++ b/src/gui/widgets/tabs/setup_visual.h
@@ -43,7 +43,7 @@ class Setup_Visual final : public SetupTabScroll
SetupItemNames *mParticleList;
NamesModel *mParticleTypeList;
NamesModel *mVSyncList;
- SetupItemNames *mScaleList;
+ NamesModel *mScaleList;
};
#endif // GUI_WIDGETS_TABS_SETUP_VISUAL_H