summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/setupitem.cpp14
-rw-r--r--src/gui/widgets/setupitem.h6
2 files changed, 13 insertions, 7 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 93854e823..1cb007eae 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -712,7 +712,7 @@ SetupItemSlider2::SetupItemSlider2(std::string text, std::string description,
std::string keyName, SetupTabScroll *parent,
std::string eventName, int min, int max,
SetupItemNames *values, bool onTheFly,
- bool mainConfig) :
+ bool mainConfig, bool doNotAlign) :
SetupItem(text, description, keyName, parent, eventName, mainConfig),
mHorizont(nullptr),
mLabel(nullptr),
@@ -723,7 +723,8 @@ SetupItemSlider2::SetupItemSlider2(std::string text, std::string description,
mMax(max),
mInvert(false),
mInvertValue(0),
- mOnTheFly(onTheFly)
+ mOnTheFly(onTheFly),
+ mDoNotAlign(doNotAlign)
{
mValueType = VSTR;
createControls();
@@ -733,7 +734,8 @@ SetupItemSlider2::SetupItemSlider2(std::string text, std::string description,
std::string keyName, SetupTabScroll *parent,
std::string eventName, int min, int max,
SetupItemNames *values, std::string def,
- bool onTheFly, bool mainConfig) :
+ bool onTheFly, bool mainConfig,
+ bool doNotAlign) :
SetupItem(text, description, keyName, parent, eventName, def, mainConfig),
mHorizont(nullptr),
mLabel(nullptr),
@@ -744,7 +746,8 @@ SetupItemSlider2::SetupItemSlider2(std::string text, std::string description,
mMax(max),
mInvert(false),
mInvertValue(0),
- mOnTheFly(onTheFly)
+ mOnTheFly(onTheFly),
+ mDoNotAlign(doNotAlign)
{
mValueType = VSTR;
createControls();
@@ -777,7 +780,8 @@ void SetupItemSlider2::createControls()
mWidget = mSlider;
mSlider->setWidth(150);
mSlider->setHeight(40);
- fixFirstItemSize(mLabel);
+ if (!mDoNotAlign)
+ fixFirstItemSize(mLabel);
mHorizont->add(mLabel);
mHorizont->add(mSlider, -10);
mHorizont->add(mLabel2);
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index 86fdf95f9..52f8515c7 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -317,13 +317,14 @@ class SetupItemSlider2 : public SetupItem
std::string keyName, SetupTabScroll *parent,
std::string eventName, int min, int max,
SetupItemNames *values, bool onTheFly = false,
- bool mainConfig = true);
+ bool mainConfig = true, bool doNotAlign = false);
SetupItemSlider2(std::string text, std::string description,
std::string keyName, SetupTabScroll *parent,
std::string eventName, int min, int max,
SetupItemNames *values, std::string def,
- bool onTheFly = false, bool mainConfig = true);
+ bool onTheFly = false, bool mainConfig = true,
+ bool doNotAlign = false);
~SetupItemSlider2();
@@ -354,6 +355,7 @@ class SetupItemSlider2 : public SetupItem
bool mInvert;
int mInvertValue;
bool mOnTheFly;
+ bool mDoNotAlign;
};
class SetupItemSliderList : public SetupItem