Improve text coloring in log
This commit is contained in:
+3
-2
@@ -90,6 +90,8 @@ BatchProcessing::BatchProcessing(QWidget *parent) : QDialog(parent)
|
||||
connect(_ui->browseButton, &QPushButton::released, this, &BatchProcessing::browse);
|
||||
connect(_ui->openScriptsButton, &QPushButton::released, this, &BatchProcessing::openScriptDir);
|
||||
|
||||
_textColor = _ui->log->textColor();
|
||||
|
||||
QSettings settings;
|
||||
_ui->outputPath->setText(settings.value("batchprocessing/outputpath", QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).first()).toString());
|
||||
}
|
||||
@@ -214,8 +216,7 @@ void BatchProcessing::scriptFinished()
|
||||
|
||||
void BatchProcessing::newMessage(const QString &message, bool error)
|
||||
{
|
||||
QColor color = _ui->log->textColor();
|
||||
if(error)_ui->log->setTextColor(Qt::red);
|
||||
else _ui->log->setTextColor(_textColor);
|
||||
_ui->log->append(message);
|
||||
if(error)_ui->log->setTextColor(color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user