1
0
nextcloud-desktop/nextcloud-fix-HiDPI-window-size.patch
Dirk Mueller ab30878426 Accepting request 1096027 from home:badshah400:branches:network
* Add nextcloud-fix-HiDPI-window-size.patch -- Fix huge sized windows for nextcloud client settings and crash-reporter on HiDPI systems.
* Set SOURCE_DATE_EPOCH from the last modified time of source files to avoid non-reproducible builds due to __DATE__/__TIME__; this replaces nextcloud-client-remove-datetime.patch which is therefore dropped. Requires cmake >= 3.8.0. Using SOURCE_DATE_EPOCH seems to be a better solution than the patch as this still preserves the date and time shown on the Settings window and could prove useful for debugging upstream. On the contrary, the patch simply removed __DATE__/__TIME__ from the sources and was not going to be accepted by upstream anyway.

OBS-URL: https://build.opensuse.org/request/show/1096027
OBS-URL: https://build.opensuse.org/package/show/network/nextcloud-desktop?expand=0&rev=108
2023-07-04 08:11:10 +00:00

28 lines
1.1 KiB
Diff

Index: desktop-3.9.0/src/gui/main.cpp
===================================================================
--- desktop-3.9.0.orig/src/gui/main.cpp
+++ desktop-3.9.0/src/gui/main.cpp
@@ -65,6 +65,8 @@ int main(int argc, char **argv)
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
+ QApplication::setHighDpiScaleFactorRoundingPolicy(
+ Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#ifdef Q_OS_MAC
Mac::CocoaInitializer cocoaInit; // RIIA
#endif
Index: desktop-3.9.0/src/crashreporter/main.cpp
===================================================================
--- desktop-3.9.0.orig/src/crashreporter/main.cpp
+++ desktop-3.9.0/src/crashreporter/main.cpp
@@ -25,6 +25,8 @@
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
+ QApplication::setHighDpiScaleFactorRoundingPolicy(
+ Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#ifdef Q_OS_WIN
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
#endif // !Q_OS_WIN