diff options
Diffstat (limited to 'src/preview/PreviewView.cpp')
| -rw-r--r-- | src/preview/PreviewView.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 00683fc..2e3d1fa 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -199,16 +199,21 @@ void PreviewView::commentBoxAutoHeight() if(!addCommentBox) return; int textWidth = Graphics::textwidth(addCommentBox->GetText().c_str()); - if(textWidth+10 > Size.X-(XRES/2)-48) + if(textWidth+15 > Size.X-(XRES/2)-48) { - commentBoxHeight = 59; addCommentBox->SetMultiline(true); addCommentBox->Appearance.VerticalAlign = ui::Appearance::AlignTop; + int oldSize = addCommentBox->Size.Y; + addCommentBox->AutoHeight(); + int newSize = addCommentBox->Size.Y+5; + addCommentBox->Size.Y = oldSize; + + commentBoxHeight = newSize+22; commentBoxPositionX = (XRES/2)+4; - commentBoxPositionY = Size.Y-58; + commentBoxPositionY = Size.Y-(newSize+21); commentBoxSizeX = Size.X-(XRES/2)-8; - commentBoxSizeY = 37; + commentBoxSizeY = newSize; } else { |
