Browse Source

Make chatlog text selectable

Fixes #10
pull/19/head
Tux3 / Mlkj / !Lev.uXFMLA 11 years ago
parent
commit
978e4bae3d
  1. 1
      widget/form/chatform.cpp
  2. 1
      widget/form/groupchatform.cpp

1
widget/form/chatform.cpp

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

1
widget/form/groupchatform.cpp

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

Loading…
Cancel
Save