summaryrefslogtreecommitdiff
path: root/src/gui/preview/PreviewView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/preview/PreviewView.cpp')
-rw-r--r--src/gui/preview/PreviewView.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/gui/preview/PreviewView.cpp b/src/gui/preview/PreviewView.cpp
index 590798e..de17531 100644
--- a/src/gui/preview/PreviewView.cpp
+++ b/src/gui/preview/PreviewView.cpp
@@ -376,12 +376,23 @@ void PreviewView::OnMouseWheel(int x, int y, int d)
c->NextCommentPage();
if(commentsPanel->GetScrollLimit() == -1 && d > 0)
{
- prevPage = true;
- c->PrevCommentPage();
+ if (c->PrevCommentPage())
+ prevPage = true;
}
}
+void PreviewView::OnMouseUp(int x, int y, unsigned int button)
+{
+ if(commentsPanel->GetScrollLimit() == 1)
+ c->NextCommentPage();
+ if(commentsPanel->GetScrollLimit() == -1)
+ {
+ if (c->PrevCommentPage())
+ prevPage = true;
+ }
+}
+
void PreviewView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt)
{
if ((key == KEY_ENTER || key == KEY_RETURN) && (!addCommentBox || !addCommentBox->IsFocused()))
@@ -558,7 +569,7 @@ void PreviewView::NotifyCommentsChanged(PreviewModel * sender)
}
if(showAvatars)
- tempUsername = new ui::Label(ui::Point(31, currentY+3), ui::Point(Size.X-((XRES/2) + 13), 16), comments->at(i)->authorNameFormatted);
+ tempUsername = new ui::Label(ui::Point(31, currentY+3), ui::Point(Size.X-((XRES/2) + 13 + 26), 16), comments->at(i)->authorNameFormatted);
else
tempUsername = new ui::Label(ui::Point(5, currentY+3), ui::Point(Size.X-((XRES/2) + 13), 16), comments->at(i)->authorNameFormatted);
tempUsername->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
@@ -593,8 +604,6 @@ void PreviewView::NotifyCommentsChanged(PreviewModel * sender)
{
prevPage = false;
commentsPanel->SetScrollPosition(currentY);
- //update positions of the comments so that it doesn't start at the top for a frame
- commentsPanel->Tick(0);
}
}
}