summaryrefslogtreecommitdiff
path: root/src/gui/windows/charcreatedialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-05 20:30:26 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-05 20:30:26 +0300
commit322aea1d69a47e8080bcd0552473a5a5d66c5e1a (patch)
tree10065fb47c0ee488e3e04da3bb86b3ddaa110e2a /src/gui/windows/charcreatedialog.cpp
parent8fda16c465f8ea9ad6c748d4a5a097ff360fe960 (diff)
downloadplus-322aea1d69a47e8080bcd0552473a5a5d66c5e1a.tar.gz
plus-322aea1d69a47e8080bcd0552473a5a5d66c5e1a.tar.bz2
plus-322aea1d69a47e8080bcd0552473a5a5d66c5e1a.tar.xz
plus-322aea1d69a47e8080bcd0552473a5a5d66c5e1a.zip
add dynamic labels string cutting.
using it in char creation dialog.
Diffstat (limited to 'src/gui/windows/charcreatedialog.cpp')
-rw-r--r--src/gui/windows/charcreatedialog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 7c09b0dfb..f6cd22720 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -587,7 +587,7 @@ void CharCreateDialog::updateHair()
}
const ItemInfo &item = ItemDB::get(-mHairStyle);
mHairStyleNameLabel->setCaption(item.getName());
- mHairStyleNameLabel->adjustSize();
+ mHairStyleNameLabel->resizeTo(150);
if (ColorDB::getHairSize())
mHairColor %= ColorDB::getHairSize();
@@ -602,6 +602,7 @@ void CharCreateDialog::updateHair()
}
mHairColorNameLabel->setCaption(ColorDB::getHairColorName(mHairColor));
mHairColorNameLabel->adjustSize();
+ mHairColorNameLabel->resizeTo(150);
mPlayer->setSprite(Net::getCharServerHandler()->hairSprite(),
mHairStyle * -1, item.getDyeColorsString(mHairColor));
@@ -638,12 +639,12 @@ void CharCreateDialog::updateLook()
if (mRaceNameLabel)
{
mRaceNameLabel->setCaption(item.getName());
- mRaceNameLabel->adjustSize();
+ mRaceNameLabel->resizeTo(150);
}
if (mLookNameLabel)
{
mLookNameLabel->setCaption(item.getColorName(mLook));
- mLookNameLabel->adjustSize();
+ mLookNameLabel->resizeTo(150);
}
}