All Classes Namespaces Functions Variables Enumerations Properties Pages
win32.cpp
1 /*
2 
3 Pencil2D - Traditional Animation Software
4 Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5 Copyright (C) 2009 Mj Mendoza IV
6 Copyright (C) 2012-2020 Matthew Chiawen Chang
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; version 2 of the License.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 */
18 
19 #include "platformhandler.h"
20 
21 #include <QCoreApplication>
22 #include <QSettings>
23 
24 #include "pencildef.h"
25 
26 namespace PlatformHandler
27 {
28  void configurePlatformSpecificSettings() {}
29  bool isDarkMode() { return false; };
30  void initialise()
31  {
32  // Temporary solution for high DPI displays
33  // EnableHighDpiScaling is a just in case mechanism in the event that we
34  // want to disable this without recompiling, see #922
35  QSettings settings(PENCIL2D, PENCIL2D);
36  if (settings.value("EnableHighDpiScaling", "true").toBool())
37  {
38  // Enable auto screen scaling on high dpi display, for example, a 4k monitor
39  // This attr has to be set before the QApplication is constructed
40  // Only works on Windows & X11
42  }
43  };
44 }
void setAttribute(Qt::ApplicationAttribute attribute, bool on)
AA_EnableHighDpiScaling