mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Harmonizing other log controls with minecraft log
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
@ -203,6 +203,8 @@ void OtherLogsPage::on_btnReload_clicked()
|
||||
// Try to determine a level for each line
|
||||
if (content.back() == '\n')
|
||||
content = content.removeLast();
|
||||
ui->text->clear();
|
||||
m_model->clear();
|
||||
for (auto& line : content.split('\n')) {
|
||||
MessageLevel::Enum level = MessageLevel::Unknown;
|
||||
|
||||
@ -232,6 +234,11 @@ void OtherLogsPage::on_btnCopy_clicked()
|
||||
GuiUtil::setClipboardText(ui->text->toPlainText());
|
||||
}
|
||||
|
||||
void OtherLogsPage::on_btnBottom_clicked()
|
||||
{
|
||||
ui->text->scrollToBottom();
|
||||
}
|
||||
|
||||
void OtherLogsPage::on_btnDelete_clicked()
|
||||
{
|
||||
if (m_currentFile.isEmpty()) {
|
||||
@ -308,6 +315,24 @@ void OtherLogsPage::on_btnClean_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void OtherLogsPage::on_wrapCheckbox_clicked(bool checked)
|
||||
{
|
||||
ui->text->setWordWrap(checked);
|
||||
if (!m_model)
|
||||
return;
|
||||
m_model->setLineWrap(checked);
|
||||
ui->text->scrollToBottom();
|
||||
}
|
||||
|
||||
void OtherLogsPage::on_colorCheckbox_clicked(bool checked)
|
||||
{
|
||||
ui->text->setColorLines(checked);
|
||||
if (!m_model)
|
||||
return;
|
||||
m_model->setColorLines(checked);
|
||||
ui->text->scrollToBottom();
|
||||
}
|
||||
|
||||
void OtherLogsPage::setControlsEnabled(const bool enabled)
|
||||
{
|
||||
ui->btnReload->setEnabled(enabled);
|
||||
|
Reference in New Issue
Block a user