Browse Source

Make all chat log selectable

pull/19/head
Tux3 / Mlkj / !Lev.uXFMLA 11 years ago
parent
commit
e2d67e4250
  1. 4
      widget/form/chatform.cpp
  2. 4
      widget/form/groupchatform.cpp

4
widget/form/chatform.cpp

@ -153,7 +153,9 @@ void ChatForm::addMessage(QLabel* author, QLabel* message, QLabel* date)
lockSliderToBottom = scroll && scroll->value() == scroll->maximum(); lockSliderToBottom = scroll && scroll->value() == scroll->maximum();
author->setAlignment(Qt::AlignTop | Qt::AlignRight); author->setAlignment(Qt::AlignTop | Qt::AlignRight);
date->setAlignment(Qt::AlignTop); date->setAlignment(Qt::AlignTop);
message->setTextInteractionFlags(Qt::TextSelectableByMouse); message->setTextInteractionFlags(Qt::TextBrowserInteraction);
author->setTextInteractionFlags(Qt::TextBrowserInteraction);
date->setTextInteractionFlags(Qt::TextBrowserInteraction);
if (author->text() == Widget::getInstance()->getUsername()) if (author->text() == Widget::getInstance()->getUsername())
{ {
QPalette pal; QPalette pal;

4
widget/form/groupchatform.cpp

@ -133,7 +133,9 @@ void GroupChatForm::addMessage(QLabel* author, QLabel* message, QLabel* date)
lockSliderToBottom = scroll && scroll->value() == scroll->maximum(); lockSliderToBottom = scroll && scroll->value() == scroll->maximum();
author->setAlignment(Qt::AlignTop | Qt::AlignLeft); author->setAlignment(Qt::AlignTop | Qt::AlignLeft);
date->setAlignment(Qt::AlignTop); date->setAlignment(Qt::AlignTop);
message->setTextInteractionFlags(Qt::TextSelectableByMouse); message->setTextInteractionFlags(Qt::TextBrowserInteraction);
author->setTextInteractionFlags(Qt::TextBrowserInteraction);
date->setTextInteractionFlags(Qt::TextBrowserInteraction);
if (author->text() == Widget::getInstance()->getUsername()) if (author->text() == Widget::getInstance()->getUsername())
{ {
QPalette pal; QPalette pal;

Loading…
Cancel
Save