Github user vladimir-kotikov commented on a diff in the pull request:
https://github.com/apache/cordova-windows/pull/218#discussion_r92604767
--- Diff: cordova-js-src/splashscreen.js ---
@@ -203,10 +212,30 @@ function enableUserInteraction() {
document.body.style['-ms-content-zooming'] = origZooming;
}
+// Make title bg color match splashscreen bg color
+function colorizeTitleBar() {
+ var appView =
Windows.UI.ViewManagement.ApplicationView.getForCurrentView();
+ if (appView.titleBar) {
+ titleInitialBgColor = appView.titleBar.backgroundColor;
+
+ appView.titleBar.backgroundColor = titleBgColor;
+ appView.titleBar.buttonBackgroundColor = titleBgColor;
+ }
+}
+
+// Revert title bg color
+function revertTitleBarColor() {
+ var appView =
Windows.UI.ViewManagement.ApplicationView.getForCurrentView();
+ if (appView.titleBar) {
--- End diff --
Is this guaranteed that title bar would exist when you're leaving
fullscreen? otherwise you may end up not reverting title bar color due to this
condition. I'm mostly speculating and trying to find really edge cases, but
still.
Perhaps might be better to subscribe to
[`ApplicationView.VisibleBoundsChanged`](https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.applicationview.visibleboundschanged.aspx)
and revert the color in the handler?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]