Skip to content

Commit

Permalink
chore: readd default scale patch package fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianFahrbach committed Dec 23, 2024
1 parent 13036e4 commit 1bd700c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
],
"scripts": {
"start": "npm run git-secret:check && react-native start",
"postinstall": "patch-package",
"devtools": "npx react-devtools",
"clear-cache": "sh ./scripts/clear-cache.sh",
"git-secret:check": "node ./scripts/check-git-secrets.mjs",
Expand Down
13 changes: 13 additions & 0 deletions patches/react-native-macos+0.76.6.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/react-native-macos/React/UIUtils/RCTUIUtils.m b/node_modules/react-native-macos/React/UIUtils/RCTUIUtils.m
index 90ce88b..b3de174 100644
--- a/node_modules/react-native-macos/React/UIUtils/RCTUIUtils.m
+++ b/node_modules/react-native-macos/React/UIUtils/RCTUIUtils.m
@@ -31,7 +31,7 @@ RCTDimensions RCTGetDimensions(CGFloat fontScale)
NSWindow *window = RCTKeyWindow();
NSSize windowSize = window ? [window frame].size : CGSizeZero;
screenSize = window ? [[window screen] frame].size : screenSize;
- CGFloat scale = window ? [[window screen] backingScaleFactor] : 1.0; // Default scale to 1.0 if window is nil
+ CGFloat scale = window ? [[window screen] backingScaleFactor] : 2.0; // Default scale to 1.0 if window is nil
#endif // macOS]

RCTDimensions result;

0 comments on commit 1bd700c

Please sign in to comment.