diff --git a/src/UI/ScriptDocumentView.cc b/src/UI/ScriptDocumentView.cc index bd82c1013d5e7262244e22c90133cabe833d3249..9fa80f5e2917e123be92f3346adbdaf3e1980445 100644 --- a/src/UI/ScriptDocumentView.cc +++ b/src/UI/ScriptDocumentView.cc @@ -41,6 +41,13 @@ ScriptDocumentView::ScriptDocumentView(std::shared_ptr<ScriptDocument> ptr, QWid } connect(this, &ScriptDocumentView::luaErrorFound, editor, &ScriptEditor::updateLastLuaError); + + // Same style as the editor + setStyleSheet(QStringLiteral("* {" + " background-color: #232629;" + " font-family: \"FiraCode\";" + " font-size: 10pt" + "}")); } void diff --git a/src/UI/ScriptViews/EditorProxy.cc b/src/UI/ScriptViews/EditorProxy.cc index aca744c02c75edc08a48de6b6fa5b159dff66ac7..0f297ecaf17336df759bcd28db65e39beda1a2c0 100644 --- a/src/UI/ScriptViews/EditorProxy.cc +++ b/src/UI/ScriptViews/EditorProxy.cc @@ -356,11 +356,11 @@ EditorProxy::save(const QString &fileName) noexcept void EditorProxy::cancel(const QString &fileName) noexcept { - if (hasChanges(fileName)) { + if (hasChanges(fileName)) qCritical() << tr("File \"%1\" was changed").arg(fileName); - } else { + + else invalidate(); - } } void