Skip to content

Commit 2bc8c2e

Browse files
committed
improve: add red cross to replay button
1 parent fe5acac commit 2bc8c2e

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

src/TConsole.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ TConsole::TConsole(Host* pH, const QString& name, const ConsoleType type, QWidge
339339
replayButton->setSizePolicy(sizePolicy5);
340340
replayButton->setFocusPolicy(Qt::NoFocus);
341341
replayButton->setIcon(QIcon(qsl(":/icons/media-tape.png")));
342-
replayButton->setToolTip(utils::richText(tr("Toggle recording of replays")));
342+
//: Button tooltip for the replay recording toggle button
343+
replayButton->setToolTip(utils::richText(tr("Start recording of replay")));
343344
connect(replayButton, &QAbstractButton::clicked, this, &TConsole::slot_toggleReplayRecording);
344345

345346
logButton = new QToolButton;
@@ -885,13 +886,21 @@ void TConsole::slot_toggleReplayRecording()
885886
mReplayStream.setDevice(&mReplayFile);
886887
mpHost->mTelnet.recordReplay();
887888
printSystemMessage(tr("Replay recording has started. File: %1").arg(mReplayFile.fileName()) % QChar::LineFeed);
889+
replayButton->setIcon(QIcon(qsl(":/icons/media-tape-red-cross.png")));
890+
//: Button tooltip for the replay recording toggle button
891+
replayButton->setToolTip(utils::richText(tr("Stop recording of replay")));
888892
} else {
889893
if (!mReplayFile.commit()) {
890894
qDebug() << "TConsole::slot_toggleReplayRecording: error saving replay: " << mReplayFile.errorString();
895+
//: Informational message displayed when replay recording is stopped but could not be saved
891896
printSystemMessage(tr("Replay recording has been stopped, but couldn't be saved.") % QChar::LineFeed);
892897
} else {
898+
//: Informational message displayed when replay recording is stopped
893899
printSystemMessage(tr("Replay recording has been stopped. File: %1").arg(mReplayFile.fileName()) % QChar::LineFeed);
894900
}
901+
replayButton->setIcon(QIcon(qsl(":/icons/media-tape.png")));
902+
//: Button tooltip for the replay recording toggle button
903+
replayButton->setToolTip(utils::richText(tr("Start recording of replay")));
895904
}
896905
}
897906

0 commit comments

Comments
 (0)