]> git.lizzy.rs Git - rust.git/commitdiff
Change theme icon
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jan 2018 20:38:56 +0000 (21:38 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jan 2018 20:47:39 +0000 (21:47 +0100)
src/librustdoc/html/layout.rs
src/librustdoc/html/render.rs
src/librustdoc/html/static/brush.svg [new file with mode: 0644]
src/librustdoc/html/static/themes/dark.css

index 105b5b103a565dc493cce05bf481f4b6089cc934..753abf4eacf4f994c35fc918708a8b2ab2cf34eb 100644 (file)
@@ -70,7 +70,8 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
         {sidebar}
     </nav>
 
-    <div id="theme-picker">&#x1f58c;
+    <div id="theme-picker">
+        <img src="{root_path}brush.svg" width="18" alt="Pick another theme!">
         <div id="theme-choices"></div>
     </div>
     <script src="{root_path}theme.js"></script>
index 95db6a8679e5dd3fda015db66a4ead453f9b4a8d..ad785fb830a56de54fcd4ef987aeb15f8d9f55e4 100644 (file)
@@ -890,6 +890,8 @@ fn write_shared(cx: &Context,
         themes.insert(try_none!(try_none!(entry.file_stem(), &entry).to_str(), &entry).to_owned());
     }
 
+    write(cx.dst.join("brush.svg"),
+          include_bytes!("static/brush.svg"))?;
     write(cx.dst.join("main.css"),
           include_bytes!("static/themes/main.css"))?;
     themes.insert("main".to_owned());
diff --git a/src/librustdoc/html/static/brush.svg b/src/librustdoc/html/static/brush.svg
new file mode 100644 (file)
index 0000000..072264a
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" ?><svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1615 0q70 0 122.5 46.5t52.5 116.5q0 63-45 151-332 629-465 752-97 91-218 91-126 0-216.5-92.5t-90.5-219.5q0-128 92-212l638-579q59-54 130-54zm-909 1034q39 76 106.5 130t150.5 76l1 71q4 213-129.5 347t-348.5 134q-123 0-218-46.5t-152.5-127.5-86.5-183-29-220q7 5 41 30t62 44.5 59 36.5 46 17q41 0 55-37 25-66 57.5-112.5t69.5-76 88-47.5 103-25.5 125-10.5z"/></svg>
\ No newline at end of file
index 43d00486ca228b526ebdd3054a9901ae9e557719..05ac0660396564dcfac4b44e7cc497e0dbe53e2e 100644 (file)
@@ -361,6 +361,7 @@ kbd {
 
 #theme-picker {
        border-color: #e0e0e0;
+       background: #f0f0f0;
 }
 
 #theme-choices {