diff --git a/tools/lammps-gui/CMakeLists.txt b/tools/lammps-gui/CMakeLists.txt index eaef9bba7f..34d01b2985 100644 --- a/tools/lammps-gui/CMakeLists.txt +++ b/tools/lammps-gui/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(lammps-gui VERSION 1.2.2 LANGUAGES CXX) +project(lammps-gui VERSION 1.2.3 LANGUAGES CXX) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) diff --git a/tools/lammps-gui/codeeditor.cpp b/tools/lammps-gui/codeeditor.cpp index a259e25c51..a1bda769c5 100644 --- a/tools/lammps-gui/codeeditor.cpp +++ b/tools/lammps-gui/codeeditor.cpp @@ -71,6 +71,7 @@ CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent) connect(this, &CodeEditor::blockCountChanged, this, &CodeEditor::updateLineNumberAreaWidth); connect(this, &CodeEditor::updateRequest, this, &CodeEditor::updateLineNumberArea); updateLineNumberAreaWidth(0); + setCursorWidth(2); } int CodeEditor::lineNumberAreaWidth() diff --git a/tools/lammps-gui/lammpsgui.cpp b/tools/lammps-gui/lammpsgui.cpp index 8c5886dd5e..3b99806bef 100644 --- a/tools/lammps-gui/lammpsgui.cpp +++ b/tools/lammps-gui/lammpsgui.cpp @@ -23,11 +23,13 @@ #include "stdcapture.h" #include "ui_lammpsgui.h" +#include #include #include #include #include #include +#include #include #include #include @@ -957,6 +959,10 @@ void LammpsGui::about() } else { version += " - LAMMPS library linked to executable"; } + + QString to_clipboard(version.c_str()); + to_clipboard += "\n\n"; + std::string info = "LAMMPS is currently running. LAMMPS config info not available."; // LAMMPS is not re-entrant, so we can only query LAMMPS when it is not running @@ -971,8 +977,12 @@ void LammpsGui::about() info = std::string(info, start, end - start); } + to_clipboard += info.c_str(); + QGuiApplication::clipboard()->setText(to_clipboard); + info += "(Note: this text has been copied to the clipboard)\n"; + QMessageBox msg; - msg.setWindowTitle("About LAMMPS-GUI"); + msg.setWindowTitle("About LAMMPS"); msg.setText(version.c_str()); msg.setInformativeText(info.c_str()); msg.setIconPixmap(QPixmap(":/lammps-icon-128x128.png").scaled(64, 64));