ui: fixed Linux issues

* no outline style for push buttons
* show error when not using Sourcetrail.sh script in console instead of message box, which won't load
This commit is contained in:
Eberhard Graether
2018-01-12 15:12:14 +01:00
parent 3edb759f0f
commit 05ff92fdea
3 changed files with 11 additions and 8 deletions
+4
View File
@@ -4,6 +4,10 @@ QToolTip {
font-size: <setting:font_size>px;
}
QPushButton {
outline: none;
}
QMainWindow::separator {
background: <color:window/separator>;
width: 1px;
+7
View File
@@ -187,6 +187,13 @@ QCoreApplication* createApplication(int &argc, char *argv[], bool noGUI = false)
int main(int argc, char *argv[])
{
#ifdef __linux__
if (std::getenv("SOURCETRAIL_VIA_SCRIPT") == nullptr)
{
std::cout << "ERROR: Please run Sourcetrail via the Sourcetrail.sh script!" << std::endl;
}
#endif
QApplication::setApplicationName("Sourcetrail");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
-8
View File
@@ -5,7 +5,6 @@
#include <QDockWidget>
#include <QDir>
#include <QMenuBar>
#include <QMessageBox>
#include <QSettings>
#include <QTimer>
@@ -112,13 +111,6 @@ QtMainWindow::QtMainWindow()
setWindowIcon(QIcon((ResourcePaths::getGuiPath().str() + "icon/logo_1024_1024.png").c_str()));
setWindowFlags(Qt::Widget);
#ifdef __linux__
if (std::getenv("SOURCETRAIL_VIA_SCRIPT") == nullptr)
{
QMessageBox::warning(this, "Run Sourcetrail via Script", "Please run Sourcetrail via Sourcetrail.sh");
}
#endif
QApplication* app = dynamic_cast<QApplication*>(QCoreApplication::instance());
app->installEventFilter(new MouseReleaseFilter(this));