You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/03/11 23:27:37 UTC

[5/5] git commit: lightContent always sets BG to black, default always sets BG to white

lightContent always sets BG to black, default always sets BG to white


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/2c470180
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/2c470180
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/2c470180

Branch: refs/heads/master
Commit: 2c47018023b3fb544bcbd33845018458ea653e95
Parents: 35740b8
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Mar 11 15:24:18 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Mar 11 15:24:18 2014 -0700

----------------------------------------------------------------------
 statusbar/src/wp/StatusBar.cs | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/2c470180/statusbar/src/wp/StatusBar.cs
----------------------------------------------------------------------
diff --git a/statusbar/src/wp/StatusBar.cs b/statusbar/src/wp/StatusBar.cs
index c6e6fe7..c20f680 100644
--- a/statusbar/src/wp/StatusBar.cs
+++ b/statusbar/src/wp/StatusBar.cs
@@ -65,6 +65,8 @@ namespace WPCordovaClassLib.Cordova.Commands
             {
                 bool isVis = SystemTray.IsVisible;
                 // TODO: pass this to JS
+                //Debug.WriteLine("Result::" + res);
+                DispatchCommandResult(new PluginResult(PluginResult.Status.OK, isVis));
             });
         }
 
@@ -77,19 +79,21 @@ namespace WPCordovaClassLib.Cordova.Commands
         {    //exec(null, null, "StatusBar", "styleDefault", []);
             Deployment.Current.Dispatcher.BeginInvoke(() =>
             {
+                SystemTray.BackgroundColor = Colors.White;
+                SystemTray.ForegroundColor = Colors.Black;
                 SystemTray.Opacity = 1.0d;
-                SystemTray.ForegroundColor = (Color)Application.Current.Resources["PhoneForegroundColor"];
-                SystemTray.BackgroundColor = (Color)Application.Current.Resources["PhoneChromeColor"];
+
             });
         }
 
         public void styleLightContent(string options)
         {    //exec(null, null, "StatusBar", "styleLightContent", []);
+            
             Deployment.Current.Dispatcher.BeginInvoke(() =>
             {
+                SystemTray.BackgroundColor = Colors.Black;
+                SystemTray.ForegroundColor = Colors.White;
                 SystemTray.Opacity = 1.0d;
-                SystemTray.ForegroundColor = SystemColors.ControlLightColor;
-                SystemTray.BackgroundColor = SystemColors.ControlDarkColor;
             });
         }
 
@@ -105,7 +109,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         public void backgroundColorByName(string options)
         {    //exec(null, null, "StatusBar", "backgroundColorByName", [colorname]);
-
+             // this should NOT be called, js should now be using/converting color names to hex 
         }
 
         public void backgroundColorByHexString(string options)