Skip to content

Commit 5a34083

Browse files
committed
Make the help button look more like the rest
1 parent 624e4b5 commit 5a34083

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

src/librustdoc/html/sources.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -346,5 +346,7 @@ pub(crate) fn print_src(
346346
} else {
347347
None
348348
},
349-
}.render_into(&mut writer).unwrap();
349+
}
350+
.render_into(&mut writer)
351+
.unwrap();
350352
}

src/librustdoc/html/static/css/rustdoc.css

+4-3
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,7 @@ a.tooltip:hover::after {
17541754
width: 80px;
17551755
}
17561756
#sidebar-button > a {
1757+
background-color: var(--button-background-color);
17571758
border-color: var(--border-color);
17581759
width: 33px;
17591760
}
@@ -1800,7 +1801,7 @@ button#toggle-all-docs:before {
18001801
/* Question mark with circle */
18011802
content: url('data:image/svg+xml,<svg width="18" height="18" viewBox="0 0 12 12" \
18021803
enable-background="new 0 0 12 12" xmlns="http://www.w3.org/2000/svg" fill="none">\
1803-
<circle r="5.5" cx="6" cy="6" stroke-width="1" stroke="black"/>\
1804+
<circle r="5.25" cx="6" cy="6" stroke-width="1.25" stroke="black"/>\
18041805
<text x="4.25" y="9" style="font:8px sans-serif;font-weight:1000" fill="black">?</text></svg>');
18051806
width: 18px;
18061807
height: 18px;
@@ -1833,7 +1834,7 @@ rustdoc-toolbar span.label {
18331834
/* sidebar resizer image */
18341835
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" \
18351836
fill="none" stroke="black">\
1836-
<rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5"/>\
1837+
<rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5" stroke="%23777"/>\
18371838
<circle cx="4.375" cy="4.375" r="1" stroke-width=".75"/>\
18381839
<path d="m7.6121 3v16 M5.375 7.625h-2 m2 3h-2 m2 3h-2" stroke-width="1.25"/></svg>');
18391840
width: 22px;
@@ -2232,7 +2233,7 @@ in src-script.js and main.js
22322233
#sidebar-button > a:before {
22332234
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \
22342235
viewBox="0 0 22 22" fill="none" stroke="black">\
2235-
<rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5"/>\
2236+
<rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5" stroke="%23777"/>\
22362237
<circle cx="4.375" cy="4.375" r="1" stroke-width=".75"/>\
22372238
<path d="m3 7.375h16m0-3h-4" stroke-width="1.25"/></svg>');
22382239
width: 22px;

src/librustdoc/html/static/js/main.js

-1
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,6 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
14911491
// By default, have help button open docs in a popover.
14921492
// If user clicks with a moderator, though, use default browser behavior,
14931493
// probably opening in a new window or tab.
1494-
const target = event.target;
14951494
if (!helpLink.contains(helpLink) ||
14961495
event.ctrlKey ||
14971496
event.altKey ||

src/librustdoc/html/static/js/search.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,8 @@ ${item.displayPath}<span class="${type}">${name}</span>\
28172817
crates += "</select></div>";
28182818
}
28192819

2820-
let output = `<div class="main-heading"><h1 class="search-results-title">Results${crates}</h1></div>`;
2820+
let output = `<div class="main-heading">\
2821+
<h1 class="search-results-title">Results${crates}</h1></div>`;
28212822
if (results.query.error !== null) {
28222823
const error = results.query.error;
28232824
error.forEach((value, index) => {

src/librustdoc/html/static/js/storage.js

-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ class RustdocToolbarElement extends HTMLElement {
280280
}
281281
connectedCallback() {
282282
const rootPath = getVar("root-path");
283-
const currentCrate = getVar("current-crate");
284283
this.innerHTML = `
285284
<div id="settings-menu" tabindex="-1">
286285
<a href="${rootPath}settings.html">

0 commit comments

Comments
 (0)