cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [33/35] git commit: lightContent always sets BG to black, default always sets BG to white
Date Thu, 13 Mar 2014 19:59:02 GMT
lightContent always sets BG to black, default always sets BG to white



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

Branch: refs/heads/master
Commit: fa8aa9869db0a283d8121fda3a82a24a70c4a723
Parents: 20da419
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Mar 11 15:24:18 2014 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Mar 11 15:24:18 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-statusbar/blob/fa8aa986/src/wp/StatusBar.cs
----------------------------------------------------------------------
diff --git a/src/wp/StatusBar.cs b/src/wp/StatusBar.cs
index c6e6fe7..c20f680 100644
--- a/src/wp/StatusBar.cs
+++ b/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)


Mime
View raw message