diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-11 18:21:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-11 18:21:16 +0300 |
commit | ad914acb8d9e3430407820d8e95e3165b2c06860 (patch) | |
tree | 10eb23d74d5da8c0fb68b5ed2953082eb3cbd0fe /src/gui/windows/charcreatedialog.cpp | |
parent | 5243dd89f5d68a6cc7a463b525b5e7e7bf77bd77 (diff) | |
download | plus-ad914acb8d9e3430407820d8e95e3165b2c06860.tar.gz plus-ad914acb8d9e3430407820d8e95e3165b2c06860.tar.bz2 plus-ad914acb8d9e3430407820d8e95e3165b2c06860.tar.xz plus-ad914acb8d9e3430407820d8e95e3165b2c06860.zip |
Add some theme parameters for char create dialog.
Diffstat (limited to 'src/gui/windows/charcreatedialog.cpp')
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index e38e1ebae..4c3b917a9 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -245,14 +245,15 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, mActionButton->setPosition(385, 100); mRotateButton->setPosition(415, 100); - mNameLabel->setPosition(5, 2); - mNameField->setDimension( - Rect(60, 2, 300, mNameField->getHeight())); - - const int leftX = 120; - const int rightX = 300; - const int labelX = 5; - const int nameX = 145; + mNameLabel->setPosition(mPadding, 2); + mNameField->setDimension(Rect(60, 2, + 300, mNameField->getHeight())); + + const int labelPadding = getOption("labelPadding", 2); + const int leftX = 120 + mPadding; + const int rightX = 300 + mPadding; + const int labelX = mPadding; + const int nameX = leftX + mPrevHairColorButton->getWidth() + labelPadding; int y = 30; mPrevHairColorButton->setPosition(leftX, y); @@ -564,18 +565,19 @@ void CharCreateDialog::setAttributes(const StringVect &labels, { mAttributeLabel[i] = new Label(this, labels[i]); mAttributeLabel[i]->setWidth(70); - mAttributeLabel[i]->setPosition(5, y + i * 24); + mAttributeLabel[i]->setPosition(mPadding, y + i * 24); mAttributeLabel[i]->adjustSize(); add(mAttributeLabel[i]); mAttributeSlider[i] = new Slider(this, min, max, 1.0); - mAttributeSlider[i]->setDimension(Rect(140, y + i * 24, 150, 12)); + mAttributeSlider[i]->setDimension(Rect(140 + mPadding, y + i * 24, + 150, 12)); mAttributeSlider[i]->setActionEventId("statslider"); mAttributeSlider[i]->addActionListener(this); add(mAttributeSlider[i]); mAttributeValue[i] = new Label(this, toString(min)); - mAttributeValue[i]->setPosition(295, y + i * 24); + mAttributeValue[i]->setPosition(295 + mPadding, y + i * 24); add(mAttributeValue[i]); } |