You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by daserge <gi...@git.apache.org> on 2016/12/13 13:05:33 UTC

[GitHub] cordova-windows pull request #218: CB-12238 [Windows] Colorize titlebar to m...

GitHub user daserge opened a pull request:

    https://github.com/apache/cordova-windows/pull/218

    CB-12238 [Windows] Colorize titlebar to match splash bg color

    <!--
    Please make sure the checklist boxes are all checked before submitting the PR. The checklist
    is intended as a quick reference, for complete details please see our Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    Windows
    
    ### What does this PR do?
    Colorize titlebar to match splash background color
    
    ### What testing has been done on this change?
    Manual testing
    
    ### Checklist
    - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/daserge/cordova-windows CB-12238

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-windows/pull/218.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #218
    
----
commit f6d766a6c3efb9deddcb7bb7bdcd060162f18f20
Author: daserge <v-...@microsoft.com>
Date:   2016-12-13T12:34:42Z

    CB-12238 [Windows] Colorize titlebar to match splash bg color

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-windows issue #218: CB-12238 [Windows] Colorize titlebar to match sp...

Posted by vladimir-kotikov <gi...@git.apache.org>.
Github user vladimir-kotikov commented on the issue:

    https://github.com/apache/cordova-windows/pull/218
  
    Sure, \U0001f6a2  it


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-windows issue #218: CB-12238 [Windows] Colorize titlebar to match sp...

Posted by daserge <gi...@git.apache.org>.
Github user daserge commented on the issue:

    https://github.com/apache/cordova-windows/pull/218
  
    @vladimir-kotikov, can I merge this?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-windows pull request #218: CB-12238 [Windows] Colorize titlebar to m...

Posted by vladimir-kotikov <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-windows pull request #218: CB-12238 [Windows] Colorize titlebar to m...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-windows/pull/218


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-windows pull request #218: CB-12238 [Windows] Colorize titlebar to m...

Posted by daserge <gi...@git.apache.org>.
Github user daserge commented on a diff in the pull request:

    https://github.com/apache/cordova-windows/pull/218#discussion_r93060350
  
    --- 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 --
    
    The change only affects desktop projects and this check for `appView.titleBar` is for Windows 8.1 OS only where titlebar isn't supported (store apps are shown without chrome).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-windows issue #218: CB-12238 [Windows] Colorize titlebar to match sp...

Posted by codecov-io <gi...@git.apache.org>.
Github user codecov-io commented on the issue:

    https://github.com/apache/cordova-windows/pull/218
  
    ## [Current coverage](https://codecov.io/gh/apache/cordova-windows/pull/218?src=pr) is 76.13% (diff: 100%)
    > Merging [#218](https://codecov.io/gh/apache/cordova-windows/pull/218?src=pr) into [master](https://codecov.io/gh/apache/cordova-windows/branch/master?src=pr) will not change coverage
    
    ```diff
    @@             master       #218   diff @@
    ==========================================
      Files            16         16          
      Lines          2204       2204          
      Methods         413        413          
      Messages          0          0          
      Branches        430        430          
    ==========================================
      Hits           1678       1678          
      Misses          526        526          
      Partials          0          0          
    ```
    
    > Powered by [Codecov](https://codecov.io?src=pr). Last update [707bf96...f6d766a](https://codecov.io/gh/apache/cordova-windows/compare/707bf962823b9585a22dfaa3ffa6f0185562df5a...f6d766a6c3efb9deddcb7bb7bdcd060162f18f20?src=pr)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org