mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Prevented empty time stamps - when less then a minute has passed - from
appearing.
This commit is contained in:
parent
858e9fa7df
commit
fe2f9f5253
2 changed files with 10 additions and 8 deletions
|
@ -76,7 +76,7 @@
|
|||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/ui/ChatWindow.cpp" line="153"/>
|
||||
<location filename="src/ui/ChatWindow.cpp" line="155"/>
|
||||
<source>%1 online now:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -109,13 +109,15 @@ void ChatWindow::addTimeStamp() {
|
|||
}
|
||||
}
|
||||
timeString.chop(1);
|
||||
QLabel* timeLabel = new QLabel(timeString);
|
||||
timeLabel->setStyleSheet("color: palette(shadow);"
|
||||
"background-color: palette(highlight);"
|
||||
"padding: 4px;");
|
||||
timeLabel->setAlignment(Qt::AlignHCenter);
|
||||
ui->messagesFormLayout->addRow(timeLabel);
|
||||
numMessagesAfterLastTimeStamp = 0;
|
||||
if (!timeString.isEmpty()) {
|
||||
QLabel* timeLabel = new QLabel(timeString);
|
||||
timeLabel->setStyleSheet("color: palette(shadow);"
|
||||
"background-color: palette(highlight);"
|
||||
"padding: 4px;");
|
||||
timeLabel->setAlignment(Qt::AlignHCenter);
|
||||
ui->messagesFormLayout->addRow(timeLabel);
|
||||
numMessagesAfterLastTimeStamp = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ChatWindow::startTimerForTimeStamps() {
|
||||
|
|
Loading…
Reference in a new issue