diff --git a/src/AboutDialog.h b/src/AboutDialog.h index a8e28a1e..aca97e70 100644 --- a/src/AboutDialog.h +++ b/src/AboutDialog.h @@ -1,23 +1,23 @@ #pragma once +#include "openscad.h" #include "qtgettext.h" #include "ui_AboutDialog.h" -#define STRINGIFY(x) #x -#define TOSTRING(x) STRINGIFY(x) - class AboutDialog : public QDialog, public Ui::AboutDialog { Q_OBJECT; public: AboutDialog(QWidget *) { setupUi(this); - this->setWindowTitle( QString(_("About OpenSCAD")) + " " + QString(TOSTRING( OPENSCAD_VERSION)) ); - this->aboutText->setOpenExternalLinks(true); + this->setWindowTitle( QString(_("About OpenSCAD")) + " " + openscad_versionnumber.c_str()); QUrl flattr_qurl(":icons/flattr.png" ); this->aboutText->loadResource( QTextDocument::ImageResource, flattr_qurl ); QString tmp = this->aboutText->toHtml(); - tmp.replace("__VERSION__",QString(TOSTRING(OPENSCAD_VERSION))); + tmp.replace("__VERSION__", openscad_versionnumber.c_str()); this->aboutText->setHtml(tmp); } + +public slots: + void on_okPushButton_clicked() { accept(); } }; diff --git a/src/AboutDialog.html b/src/AboutDialog.html index d138eecb..8eefeecf 100644 --- a/src/AboutDialog.html +++ b/src/AboutDialog.html @@ -19,7 +19,7 @@

-OpenSCAD version __VERSION__ +OpenSCAD version __VERSION__

diff --git a/src/AboutDialog.ui b/src/AboutDialog.ui index 587d27e2..0a3bedf9 100644 --- a/src/AboutDialog.ui +++ b/src/AboutDialog.ui @@ -6,16 +6,98 @@ 0 0 - 567 - 359 + 628 + 419 + + + 0 + 0 + + About OpenSCAD - - + + + 16 + + + 6 + + + + + 0 + + + 6 + + + + + + 96 + 96 + + + + + 96 + 96 + + + + + + + :/icons/openscad.png + + + true + + + + + + + <html><head/><body> +<p style="font-family: 'Open Sans', 'Droid Sans', 'sans-serif'; font-weight: bold; padding-bottom: 0; margin-bottom: 0; font-size: 22pt;"><span style="color: green;">Open</span>SCAD</p> +<p style="font-family: 'Open Sans', 'Droid Sans', 'sans-serif'; font-weight: normal; font-size: 14pt; padding-top: 0; margin-top: 0; margin-left: 2em;">The Programmers Solid 3D CAD Modeller</p> +</body></html> + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 2 + + + + + + + + + + 400 + 200 + + true @@ -24,8 +106,31 @@ qrc:/src/AboutDialog.html + + true + + + + + OK + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + diff --git a/src/FontListTableView.cc b/src/FontListTableView.cc index b013d81f..b6162a24 100644 --- a/src/FontListTableView.cc +++ b/src/FontListTableView.cc @@ -50,13 +50,14 @@ void FontListTableView::startDrag(Qt::DropActions supportedActions) mimeData->setText(text); QFontMetrics fm(font()); - QRect rect(0, 0, fm.width(text), fm.height()); + QRect rect(0, 0, fm.width(text) + 8, fm.height() + 8); QPixmap pixmap(rect.width(), rect.height()); - pixmap.fill(Qt::transparent); + pixmap.fill(QColor(240, 240, 240, 160)); QPainter painter(&pixmap); painter.setFont(font()); painter.drawText(rect, Qt::AlignCenter, text); + painter.drawRect(0, 0, rect.width() - 1, rect.height() - 1); QDrag *drag = new QDrag(this); drag->setPixmap(pixmap); diff --git a/src/launchingscreen.ui b/src/launchingscreen.ui index cd4c8cd8..3bb2d0d8 100644 --- a/src/launchingscreen.ui +++ b/src/launchingscreen.ui @@ -337,43 +337,48 @@ QPushButton:pressed { - - - - - 0 - 0 - - - - Version - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - true - - - - 0 - 0 - - - - false - - - Don't show again - - - false - - + + + + + + true + + + false + + + Don't show again + + + false + + + + + + + Qt::Horizontal + + + + 2 + 2 + + + + + + + + Version + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + diff --git a/src/mainwin.cc b/src/mainwin.cc index 8841349a..3e51f1f3 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -679,6 +679,11 @@ MainWindow::~MainWindow() #endif delete this->thrownTogetherRenderer; MainWindow::getWindows()->remove(this); + if (MainWindow::getWindows()->size() == 0) { + // Quit application even in case some other windows like + // Preferences are still open. + qApp->quit(); + } } void MainWindow::showProgress()