ui: Change screen scaling on Linux (issue #518, #523)

* Set environment variables QT_AUTO_SCREEN_SCALE_FACTOR and QT_SCALE_FACTOR on Linux on app start
* Added ScreenAutoScaling and ScreenScaleFactor to ApplicationSettings with dropdown boxes in the preferences
  only visible on Linux
* Removed QtFontPicker and QtTextEncodingPicker
* Moved logging into preferences category "output"

fortune cookie message = You will have a peace of mind when you talk to an old friend
This commit is contained in:
Eberhard Graether
2018-01-16 11:01:32 +01:00
parent 6672127c68
commit 43c223368c
15 changed files with 375 additions and 248 deletions
+6 -4
View File
@@ -187,15 +187,17 @@ QCoreApplication* createApplication(int &argc, char *argv[], bool noGUI = false)
int main(int argc, char *argv[])
{
#ifdef __linux__
if (std::getenv("SOURCETRAIL_VIA_SCRIPT") == nullptr)
if (utility::getOsType() == OS_LINUX && 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);
if (utility::getOsType() != OS_LINUX)
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
}
Version version(
VERSION_YEAR,