Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(UI): improve unclear message about text being resized in chatform
Browse files Browse the repository at this point in the history
  • Loading branch information
zetok committed Apr 2, 2017
1 parent a4a5d29 commit c8ed535
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/chatlog/chatmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,22 @@ ChatMessage::Ptr ChatMessage::createTypingNotification()
return msg;
}

/**
* @brief Create message placeholder while chatform restructures text
*
* It can take a while for chatform to resize large amounts of text, thus
* a message placeholder is needed to inform users about it.
*
* @return created message
*/
ChatMessage::Ptr ChatMessage::createBusyNotification()
{
ChatMessage::Ptr msg = ChatMessage::Ptr(new ChatMessage);
QFont baseFont = Settings::getInstance().getChatMessageFont();
baseFont.setPixelSize(baseFont.pixelSize() + 2);
baseFont.setBold(true);

msg->addColumn(new Text(QObject::tr("Resizing"), baseFont, false, ""),
msg->addColumn(new Text(QObject::tr("Reformatting text in progress.."), baseFont, false, ""),
ColumnFormat(1.0, ColumnFormat::VariableSize, ColumnFormat::Center));

return msg;
Expand Down

0 comments on commit c8ed535

Please sign in to comment.