Skip to content

Commit

Permalink
messageBox: use text width to calculate window size
Browse files Browse the repository at this point in the history
  • Loading branch information
magiblot committed Aug 17, 2020
1 parent 7b15d45 commit dfe2c01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/tvision/msgbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ static TRect makeRect(const char *text)
{
TRect r( 0, 0, 40, 9 );

int len = strlen(text);
while (len > (r.b.x - 7)*(r.b.y - 6))
int width = strwidth(text);
while (width > (r.b.x - 7)*(r.b.y - 6))
++r.b.y;

r.move((TProgram::deskTop->size.x - r.b.x) / 2,
Expand Down

0 comments on commit dfe2c01

Please sign in to comment.