fix initial underline width

This commit is contained in:
Glenn Maynard
2006-02-27 03:54:03 +00:00
parent 264120c28c
commit 9488915ff0
+5 -2
View File
@@ -358,6 +358,9 @@ void OptionRow::InitText()
pText->SetX( m_pParentType->ITEMS_LONG_ROW_X.GetValue(p) );
}
// Set the text now, so SetWidthXY below is correct.
UpdateText( p );
// init underlines
if( m_pParentType->SHOW_UNDERLINES && GetRowType() != OptionRow::RowType_Exit )
{
@@ -368,7 +371,7 @@ void OptionRow::InitText()
int iWidth, iX, iY;
GetWidthXY( p, 0, iWidth, iX, iY );
pCursor->SetX( float(iX) );
pCursor->SetWidth( float(iWidth) );
pCursor->SetBarWidth( iWidth );
}
}
break;
@@ -401,7 +404,7 @@ void OptionRow::InitText()
m_Underline[p].push_back( ul );
ul->Set( p );
ul->SetX( fX );
ul->SetWidth( truncf(fItemWidth) );
ul->SetBarWidth( int(fItemWidth) );
}
}