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:
@@ -4,6 +4,10 @@ QToolTip {
|
||||
font-size: <setting:font_size>px;
|
||||
}
|
||||
|
||||
QPushButton {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QMainWindow::separator {
|
||||
background: <color:window/separator>;
|
||||
width: 1px;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user