1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Fix window formatting on tool tip with too log titles

This commit is contained in:
eduard 2012-12-02 14:12:18 +01:00
parent 7e7e6e2bcb
commit 30d0e93cf4

View File

@ -506,14 +506,14 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
if (captionSize.width > maximumWidth){ if (captionSize.width > maximumWidth){
mHorizontalScrollIndex = mHorizontalScrollIndex + 2; mHorizontalScrollIndex = mHorizontalScrollIndex + 2;
if (mHorizontalScrollIndex > captionSize.width){ if (mHorizontalScrollIndex > captionSize.width){
mHorizontalScrollIndex = -totalSize.width; mHorizontalScrollIndex = -totalSize.width;
} }
int horizontal_scroll = mHorizontalScrollIndex; int horizontal_scroll = mHorizontalScrollIndex;
if (horizontal_scroll < 40){ if (horizontal_scroll < 40){
horizontal_scroll = 40; horizontal_scroll = 40;
}else{ }else{
horizontal_scroll = 80 - mHorizontalScrollIndex; horizontal_scroll = 80 - mHorizontalScrollIndex;
} }
captionWidget->setPosition (IntPoint(horizontal_scroll, captionWidget->getPosition().top + padding.top)); captionWidget->setPosition (IntPoint(horizontal_scroll, captionWidget->getPosition().top + padding.top));
} else { } else {
captionWidget->setPosition (captionWidget->getPosition() + padding); captionWidget->setPosition (captionWidget->getPosition() + padding);