From 9adf799b4ff4fae3049fac6e03c54340065ae2de Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Fri, 14 Nov 2014 03:09:55 +0100 Subject: [PATCH 1/1] make switch actually look good and work correctly --- index.html | 4 ++-- js/tricorder.js | 4 ++-- style/tricorder.css | 16 ++++++++++++---- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index f8cb293..5f4979b 100644 --- a/index.html +++ b/index.html @@ -124,9 +124,9 @@ a better device. Distance:...
diff --git a/js/tricorder.js b/js/tricorder.js index f8bc28f..92885da 100644 --- a/js/tricorder.js +++ b/js/tricorder.js @@ -376,8 +376,8 @@ var gModEnv = { switchFlashlight: function(aEnabled) { if (this.flashCamera) { this.flashCamera.flashMode = aEnabled ? 'torch' : 'off'; - document.getElementById("envFlashOn").disabled == aEnabled; - document.getElementById("envFlashOff").disabled == !aEnabled; + document.getElementById("envFlashOn").disabled = aEnabled; + document.getElementById("envFlashOff").disabled = !aEnabled; } } } diff --git a/style/tricorder.css b/style/tricorder.css index cc79ade..d60e7aa 100644 --- a/style/tricorder.css +++ b/style/tricorder.css @@ -248,10 +248,9 @@ button { color: #000000; background-color: #C09070; border-radius: 3000px; - margin: 0 .25em; } -button.disabled { +button:disabled { background-color: #402858; } @@ -276,19 +275,28 @@ button.disabled { } #envFlashAvail { - padding: 1em 3px 0; + margin-top: .5em; + padding: .5em 3px 0; + border-top: 2px solid #A09090; +} + +.envButton { + font-size: 200%; + margin-top: .25em; } #envFlashOn { - margin-right: 0; + margin-right: 3px; border-top-right-radius: 0; border-bottom-right-radius: 0; + padding-left: .5em; } #envFlashOff { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; + padding-right: .5em; } @media screen and (min-width: 500px) { -- 2.35.3