mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
improve chat scrollbar
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1693 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
36a534b85d
commit
a3e010b842
@ -779,7 +779,8 @@ void PeersDialog::insertChat()
|
|||||||
|
|
||||||
QScrollBar *qsb = msgWidget->verticalScrollBar();
|
QScrollBar *qsb = msgWidget->verticalScrollBar();
|
||||||
int oldQsbValue = qsb->value();
|
int oldQsbValue = qsb->value();
|
||||||
bool maxQsbValue = (qsb->maximum() == qsb->value());
|
//check if the scroll bar is at the bottom. If t is, we will putt it at the bottom after the new message
|
||||||
|
bool maxQsbValue = ((qsb->maximum() - 30) < qsb->value());
|
||||||
|
|
||||||
msgWidget->setHtml(currenttxt);
|
msgWidget->setHtml(currenttxt);
|
||||||
msgWidget->update();
|
msgWidget->update();
|
||||||
|
@ -222,7 +222,8 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
|||||||
//store the state of the vertical scrollbar to set it at the end of the function
|
//store the state of the vertical scrollbar to set it at the end of the function
|
||||||
QScrollBar *qsb = ui.textBrowser->verticalScrollBar();
|
QScrollBar *qsb = ui.textBrowser->verticalScrollBar();
|
||||||
int oldQsbValue = qsb->value();
|
int oldQsbValue = qsb->value();
|
||||||
bool maxQsbValue = (qsb->maximum() == qsb->value());
|
//check if the scroll bar is at the bottom. If t is, we will putt it at the bottom after the new message
|
||||||
|
bool maxQsbValue = ((qsb->maximum() - 30) < qsb->value());
|
||||||
|
|
||||||
bool offline = true;
|
bool offline = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user