summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-01 14:07:38 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-01 14:07:38 +0300
commit7afb9df4a8fdecc0d6b93a7dbd7044e0f6a358f3 (patch)
tree2aa557aac271eb15b1f70bbfb7842e593e90b791 /src/gui
parent1b2001d45ea6ee99490d4b1c374b1a03d73bbc86 (diff)
downloadmanaplus-7afb9df4a8fdecc0d6b93a7dbd7044e0f6a358f3.tar.gz
manaplus-7afb9df4a8fdecc0d6b93a7dbd7044e0f6a358f3.tar.bz2
manaplus-7afb9df4a8fdecc0d6b93a7dbd7044e0f6a358f3.tar.xz
manaplus-7afb9df4a8fdecc0d6b93a7dbd7044e0f6a358f3.zip
Add strong typed bool enum donotalign.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/setupitem.cpp6
-rw-r--r--src/gui/widgets/setupitem.h7
-rw-r--r--src/gui/widgets/tabs/setup_audio.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_visual.cpp2
4 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index be26265c3..2f5b2090c 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -848,7 +848,7 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text,
SetupItemNames *restrict const values,
const OnTheFly onTheFly,
const MainConfig mainConfig,
- const bool doNotAlign) :
+ const DoNotAlign doNotAlign) :
SetupItem(text, description, keyName, parent, eventName, mainConfig),
mHorizont(nullptr),
mLabel(nullptr),
@@ -879,7 +879,7 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text,
const std::string &restrict def,
const OnTheFly onTheFly,
const MainConfig mainConfig,
- const bool doNotAlign) :
+ const DoNotAlign doNotAlign) :
SetupItem(text, description, keyName, parent, eventName, def, mainConfig),
mHorizont(nullptr),
mLabel(nullptr),
@@ -926,7 +926,7 @@ void SetupItemSlider2::createControls()
mWidget = mSlider;
mSlider->setWidth(150);
mSlider->setHeight(40);
- if (!mDoNotAlign)
+ if (mDoNotAlign == DoNotAlign_false)
fixFirstItemSize(mLabel);
mHorizont->add(mLabel);
mHorizont->add(mSlider, -10);
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index 2bfa9e04c..cc7a04044 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -21,6 +21,7 @@
#ifndef GUI_WIDGETS_SETUPITEM_H
#define GUI_WIDGETS_SETUPITEM_H
+#include "enums/simpletypes/donotalign.h"
#include "enums/simpletypes/mainconfig.h"
#include "enums/simpletypes/onthefly.h"
#include "enums/simpletypes/usebase64.h"
@@ -418,7 +419,7 @@ class SetupItemSlider2 final : public SetupItem
SetupItemNames *restrict const values,
const OnTheFly onTheFly,
const MainConfig mainConfig,
- const bool doNotAlign);
+ const DoNotAlign doNotAlign);
SetupItemSlider2(const std::string &restrict text,
const std::string &restrict description,
@@ -430,7 +431,7 @@ class SetupItemSlider2 final : public SetupItem
const std::string &restrict def,
const OnTheFly onTheFly,
const MainConfig mainConfig,
- const bool doNotAlign);
+ const DoNotAlign doNotAlign);
A_DELETE_COPY(SetupItemSlider2)
@@ -464,7 +465,7 @@ class SetupItemSlider2 final : public SetupItem
int mInvertValue;
bool mInvert;
OnTheFly mOnTheFly;
- bool mDoNotAlign;
+ DoNotAlign mDoNotAlign;
};
class SetupItemSliderList notfinal : public SetupItem
diff --git a/src/gui/widgets/tabs/setup_audio.cpp b/src/gui/widgets/tabs/setup_audio.cpp
index 0aa824813..d47816fa0 100644
--- a/src/gui/widgets/tabs/setup_audio.cpp
+++ b/src/gui/widgets/tabs/setup_audio.cpp
@@ -105,7 +105,7 @@ Setup_Audio::Setup_Audio(const Widget2 *const widget) :
"audioChannels", 1, 4, 1, mChannelsList,
OnTheFly_false,
MainConfig_true,
- false);
+ DoNotAlign_false);
// TRANSLATORS: settings group
diff --git a/src/gui/widgets/tabs/setup_visual.cpp b/src/gui/widgets/tabs/setup_visual.cpp
index f33a9a5d3..161ea4870 100644
--- a/src/gui/widgets/tabs/setup_visual.cpp
+++ b/src/gui/widgets/tabs/setup_visual.cpp
@@ -175,7 +175,7 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
this, "particleEmitterSkipEvent", 0, 3, 1, mParticleList,
OnTheFly_true,
MainConfig_true,
- false))->setInvertValue(3);
+ DoNotAlign_false))->setInvertValue(3);
mParticleTypeList->fillFromArray(&particleTypeList[0],
particleTypeListSize);