mirror of https://github.com/vitalif/openscad
Add OpenSCAD version to the status bar.
parent
c4e895a813
commit
5ad36c82b6
|
@ -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");
|
||||
|
|
|
@ -616,6 +616,9 @@ int gui(vector<string> &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
|
||||
|
|
Loading…
Reference in New Issue