about summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-08-21 13:10:06 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-08-21 13:10:06 +0200
commit3375b05cd03a60cd7e2df0e21e232c73ff8a01cb (patch)
treeb773cc79c594b3731d15e47dcc9fcaffba772cdf /src/librustdoc/html/render.rs
parent7858dc237d70fc0c5a31eb528dfab1ad0baf6a27 (diff)
downloadrust-3375b05cd03a60cd7e2df0e21e232c73ff8a01cb.tar.gz
rust-3375b05cd03a60cd7e2df0e21e232c73ff8a01cb.zip
Fix confusion in theme picker functions
Diffstat (limited to 'src/librustdoc/html/render.rs')
-rw-r--r--src/librustdoc/html/render.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index ea97cea9428..ae988f6f9ca 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -876,22 +876,22 @@ r#"var themes = document.getElementById("theme-choices");
 var themePicker = document.getElementById("theme-picker");
 
 function showThemeButtonState() {{
-    themes.style.display = "none";
-    themePicker.style.borderBottomRightRadius = "3px";
-    themePicker.style.borderBottomLeftRadius = "3px";
-}}
-
-function hideThemeButtonState() {{
     themes.style.display = "block";
     themePicker.style.borderBottomRightRadius = "0";
     themePicker.style.borderBottomLeftRadius = "0";
 }}
 
+function hideThemeButtonState() {{
+    themes.style.display = "none";
+    themePicker.style.borderBottomRightRadius = "3px";
+    themePicker.style.borderBottomLeftRadius = "3px";
+}}
+
 function switchThemeButtonState() {{
     if (themes.style.display === "block") {{
-        showThemeButtonState();
-    }} else {{
         hideThemeButtonState();
+    }} else {{
+        showThemeButtonState();
     }}
 }};