diff --git a/src/mainwin.cc b/src/mainwin.cc index 8f399c21..684b9fc9 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -127,12 +127,16 @@ unsigned int GuiLocker::gui_locked = 0; #define QUOTE(x__) # x__ #define QUOTED(x__) QUOTE(x__) -static char helptitle[] = - "OpenSCAD " QUOTED(OPENSCAD_VERSION) +static std::string versionnumber = QUOTED(OPENSCAD_VERSION) #ifdef OPENSCAD_COMMIT " (git " QUOTED(OPENSCAD_COMMIT) ")" #endif - "\nhttp://www.openscad.org\n\n"; +; + +static std::string openscad_version = "OpenSCAD " + versionnumber; + +static std::string helptitle = openscad_version + "\nhttp://www.openscad.org\n\n"; + static char copyrighttext[] = "Copyright (C) 2009-2014 The OpenSCAD Developers\n" "\n" @@ -189,6 +193,9 @@ MainWindow::MainWindow(const QString &filename) this->consoleDock->setConfigKey("view/hideConsole"); this->consoleDock->setAction(this->viewActionHideConsole); + QLabel *versionLabel = new QLabel(openscad_version.c_str()); + this->statusbar->addPermanentWidget(versionLabel); + QSettings settings; editortype = settings.value("editor/editortype").toString(); useScintilla = (editortype != "Simple Editor"); diff --git a/src/openscad.cc b/src/openscad.cc index 89d2bf12..47ff6461 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -616,6 +616,9 @@ int gui(vector &inputFiles, const fs::path &original_path, int argc, cha } #endif QApplication app(argc, argv, true); //useGUI); + // remove ugly frames in the QStatusBar when using additional widgets + app.setStyleSheet("QStatusBar::item { border: 0px solid black }; "); + #ifdef Q_OS_MAC app.installEventFilter(new EventFilter(&app)); #endif