diff --git a/src/Core/Settings.cpp b/src/Core/Settings.cpp index 6b438a208..1b5ac1380 100644 --- a/src/Core/Settings.cpp +++ b/src/Core/Settings.cpp @@ -757,9 +757,10 @@ GSettings::defaultAppearanceSettings() // leave 12% of the screen free to the left and right of the main window // and same number of pixels above and below - returning.windowsize.setWidth(screensize.width() * 0.88); - double margin = (screensize.width() - returning.windowsize.width()) / 2; - returning.windowsize.setHeight(screensize.height() - (margin * 2)); + double width = screensize.width() * 0.88; + double margin = (screensize.width() - width) / 2.0; + returning.windowsize.setWidth(screensize.width() - margin); + returning.windowsize.setHeight(screensize.height() - margin); returning.windowsize.setX(margin); returning.windowsize.setY(margin); diff --git a/src/Gui/AbstractView.h b/src/Gui/AbstractView.h index 6b50ad3f0..c3c25a702 100644 --- a/src/Gui/AbstractView.h +++ b/src/Gui/AbstractView.h @@ -31,6 +31,8 @@ #include "GcSideBarItem.h" #include "GcWindowRegistry.h" +#include "Settings.h" + class AthleteTab; class ViewSplitter; class Context;