Explorar o código

icon: Do not enforce icon on startup, fixes #622

We enforce the icon onstartup and this has been reported as an issue for people willing to change the application Icon on OSX.

This is only required on Windows.
On OSX this would break ability of user to change the App icon which is made from the SVG version.
We limit setting this window icon to Windows then.
Lionel CHAZALLON %!s(int64=7) %!d(string=hai) anos
pai
achega
8569997885
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/main.cpp

+ 4 - 0
src/main.cpp

@@ -165,7 +165,11 @@ int main(int argc, char *argv[])
       qputenv("QT_SCALE_FACTOR", scale.toUtf8());
 
     QApplication app(newArgc, newArgv);
+#if Q_OS_WIN
+    // Setting the icon on Windows is necessary but will break user
+    // ability to change icon on OSX
     app.setWindowIcon(QIcon(":/images/icon.png"));
+#endif
 
 #if defined(Q_OS_MAC) && defined(NDEBUG)
     PFMoveToApplicationsFolderIfNecessary();