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
+20 -10
View File
@@ -225,6 +225,26 @@ void ApplicationSettings::setGraphControlsVisible(bool visible)
setValue<bool>("application/graph_controls_visible", visible);
}
int ApplicationSettings::getScreenAutoScaling() const
{
return getValue<int>("screen/auto_scaling", 1);
}
void ApplicationSettings::setScreenAutoScaling(int autoScaling)
{
setValue<int>("screen/auto_scaling", autoScaling);
}
float ApplicationSettings::getScreenScaleFactor() const
{
return getValue<float>("screen/scale_factor", -1.0);
}
void ApplicationSettings::setScreenScaleFactor(float scaleFactor)
{
setValue<float>("screen/scale_factor", scaleFactor);
}
bool ApplicationSettings::getLoggingEnabled() const
{
return getValue<bool>("application/logging_enabled", false);
@@ -265,16 +285,6 @@ int ApplicationSettings::getLogFilter() const
return getValue<int>("application/log_filter", Logger::LOG_WARNINGS | Logger::LOG_ERRORS);
}
std::vector<FilePath> ApplicationSettings::getIndexingFilePaths() const
{
return getPathValues("application/state/indexing_paths/indexing_path");
}
bool ApplicationSettings::setIndexingFilePaths(const std::vector<FilePath>& indexingFiles)
{
return setPathValues("application/state/indexing_paths/indexing_path", indexingFiles);
}
int ApplicationSettings::getIndexerThreadCount() const
{
return getValue<int>("indexing/indexer_thread_count", 0);