@@ -39,7 +39,7 @@ struct Unistyles {
39
39
auto bounds = Window::Current ().Bounds ();
40
40
41
41
if (this ->unistylesRuntime != nullptr ) {
42
- ((UnistylesRuntime*)this ->unistylesRuntime )->handleScreenSizeChange ((int )bounds.Width , (int )bounds.Height );
42
+ ((UnistylesRuntime*)this ->unistylesRuntime )->handleScreenSizeChange ((int )bounds.Width , (int )bounds.Height , this . getInsets (), this . getStatusBarDimensions () );
43
43
}
44
44
}));
45
45
@@ -94,7 +94,9 @@ struct Unistyles {
94
94
uiInfo.screenWidth ,
95
95
uiInfo.screenHeight ,
96
96
uiInfo.colorScheme ,
97
- uiInfo.contentSizeCategory
97
+ uiInfo.contentSizeCategory ,
98
+ this ->getInsets (),
99
+ this ->getStatusBarDimensions ()
98
100
);
99
101
100
102
unistylesRuntime->onThemeChange ([this ](std::string theme) {
@@ -192,6 +194,26 @@ struct Unistyles {
192
194
193
195
return UnistylesUnspecifiedScheme;
194
196
}
197
+
198
+ std::map<std::string, int >getInsets () {
199
+ std::map<std::string, int > insets;
200
+
201
+ insets.insert ({ " top" , 0 });
202
+ insets.insert ({ " bottom" , 0 });
203
+ insets.insert ({ " left" , 0 });
204
+ insets.insert ({ " right" , 0 });
205
+
206
+ return insets;
207
+ }
208
+
209
+ std::map<std::string, int >getStatusBarDimensions () {
210
+ std::map<std::string, int > statusBar;
211
+
212
+ statusBar.insert ({ " height" , 0 });
213
+ statusBar.insert ({ " width" , 0 });
214
+
215
+ return statusBar;
216
+ }
195
217
};
196
218
197
219
} // namespace winrt::ReactNativeUnistyles
0 commit comments