Skip to content

Commit f16a742

Browse files
committed
8351626: Update remaining icons to SVG format
Reviewed-by: nbenalla, jjg
1 parent a21fa46 commit f16a742

File tree

17 files changed

+100
-32
lines changed

17 files changed

+100
-32
lines changed

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,16 @@ protected void generateOtherFiles(ClassTree classTree)
317317
copyResource(DocPaths.STYLESHEET, DocPaths.RESOURCE_FILES.resolve(DocPaths.STYLESHEET), true);
318318
}
319319
copyResource(DocPaths.SCRIPT_JS_TEMPLATE, DocPaths.SCRIPT_FILES.resolve(DocPaths.SCRIPT_JS), true);
320+
copyResource(DocPaths.LEFT_SVG, DocPaths.RESOURCE_FILES.resolve(DocPaths.LEFT_SVG), true);
321+
copyResource(DocPaths.RIGHT_SVG, DocPaths.RESOURCE_FILES.resolve(DocPaths.RIGHT_SVG), true);
320322
copyResource(DocPaths.CLIPBOARD_SVG, DocPaths.RESOURCE_FILES.resolve(DocPaths.CLIPBOARD_SVG), true);
321323
copyResource(DocPaths.LINK_SVG, DocPaths.RESOURCE_FILES.resolve(DocPaths.LINK_SVG), true);
322324

323325
if (options.createIndex()) {
324326
copyResource(DocPaths.SEARCH_JS_TEMPLATE, DocPaths.SCRIPT_FILES.resolve(DocPaths.SEARCH_JS), true);
325327
copyResource(DocPaths.SEARCH_PAGE_JS, DocPaths.SCRIPT_FILES.resolve(DocPaths.SEARCH_PAGE_JS), true);
326-
copyResource(DocPaths.GLASS_IMG, DocPaths.RESOURCE_FILES.resolve(DocPaths.GLASS_IMG), false);
327-
copyResource(DocPaths.X_IMG, DocPaths.RESOURCE_FILES.resolve(DocPaths.X_IMG), false);
328+
copyResource(DocPaths.GLASS_SVG, DocPaths.RESOURCE_FILES.resolve(DocPaths.GLASS_SVG), false);
329+
copyResource(DocPaths.X_SVG, DocPaths.RESOURCE_FILES.resolve(DocPaths.X_SVG), false);
328330
// No newline replacement for JQuery files
329331
copyResource(DocPaths.JQUERY_DIR.resolve(DocPaths.JQUERY_JS),
330332
DocPaths.SCRIPT_FILES.resolve(DocPaths.JQUERY_JS), false);

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableOfContents.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
package jdk.javadoc.internal.doclets.formats.html;
2626

2727
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyles;
28+
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
2829
import jdk.javadoc.internal.html.Content;
2930
import jdk.javadoc.internal.html.Entity;
3031
import jdk.javadoc.internal.html.HtmlAttr;
@@ -107,9 +108,13 @@ protected Content toContent(boolean hasFilterInput) {
107108
content.add(listBuilder);
108109
content.add(HtmlTree.BUTTON(HtmlStyles.hideSidebar)
109110
.add(HtmlTree.SPAN(writer.contents.hideSidebar).add(Entity.NO_BREAK_SPACE))
110-
.add(Entity.LEFT_POINTING_ANGLE));
111+
.add(HtmlTree.of(HtmlTag.IMG)
112+
.put(HtmlAttr.SRC, writer.pathToRoot.resolve(DocPaths.RESOURCE_FILES)
113+
.resolve(DocPaths.LEFT_SVG).getPath())));
111114
content.add(HtmlTree.BUTTON(HtmlStyles.showSidebar)
112-
.add(Entity.RIGHT_POINTING_ANGLE)
115+
.add(HtmlTree.of(HtmlTag.IMG)
116+
.put(HtmlAttr.SRC, writer.pathToRoot.resolve(DocPaths.RESOURCE_FILES)
117+
.resolve(DocPaths.RIGHT_SVG).getPath()))
113118
.add(HtmlTree.SPAN(Entity.NO_BREAK_SPACE).add(writer.contents.showSidebar)));
114119
return content;
115120
}
-499 Bytes
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Loading

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/stylesheet.css

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,10 @@ ol.sub-nav-list li {
278278
scroll-snap-align: start;
279279
}
280280
ol.sub-nav-list li:not(:first-child) {
281-
list-style-type: "> ";
282-
margin-left: 19px;
281+
background: url("right.svg") no-repeat 3px;
282+
background-size: 10px;
283+
padding-left: 17px;
284+
list-style: none;
283285
}
284286
ol.sub-nav-list a {
285287
padding: 3px;
@@ -455,6 +457,11 @@ dl.name-value > dd {
455457
padding: 6px 10px;
456458
white-space: nowrap;
457459
}
460+
.main-grid nav.toc button > img {
461+
vertical-align: middle;
462+
width: 16px;
463+
height: 16px;
464+
}
458465
.main-grid nav.toc button.hide-sidebar {
459466
right: 0;
460467
}
@@ -997,10 +1004,10 @@ li.ui-static-link a, li.ui-static-link a:visited {
9971004
padding-bottom: 5px;
9981005
}
9991006
input[type="text"] {
1000-
background-image:url('glass.png');
1007+
background-image:url('glass.svg');
10011008
background-size:13px;
10021009
background-repeat:no-repeat;
1003-
background-position:3px 5px;
1010+
background-position:3px 4px;
10041011
background-color: var(--search-input-background-color);
10051012
color: var(--search-input-text-color);
10061013
border-color: var(--border-color);
@@ -1026,7 +1033,7 @@ input.filter-input {
10261033
}
10271034
input#reset-search, input.reset-filter {
10281035
background-color: transparent;
1029-
background-image:url('x.png');
1036+
background-image:url('x.svg');
10301037
background-repeat:no-repeat;
10311038
background-size:contain;
10321039
border:0;
-394 Bytes
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Loading

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPaths.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public DocPaths(Utils utils) {
7373
/** The name of the DejaVu web fonts CSS file. */
7474
public static final DocPath DEJAVU_CSS = DocPath.create("dejavu.css");
7575

76-
/** The name of the image file showing a magnifying glass on the search box. */
77-
public static final DocPath GLASS_IMG = DocPath.create("glass.png");
76+
/** The name of the svg file showing a magnifying glass on the search box. */
77+
public static final DocPath GLASS_SVG = DocPath.create("glass.svg");
7878

7979
/** The name of the file for help info. */
8080
public static final DocPath HELP_DOC = DocPath.create("help-doc.html");
@@ -106,9 +106,15 @@ public static DocPath indexN(int n) {
106106
/** The name of the copy-to-clipboard icon file. */
107107
public static final DocPath CLIPBOARD_SVG = DocPath.create("copy.svg");
108108

109+
/** The name of the left pointing angle icon. */
110+
public static final DocPath LEFT_SVG = DocPath.create("left.svg");
111+
109112
/** The name of the link icon file. */
110113
public static final DocPath LINK_SVG = DocPath.create("link.svg");
111114

115+
/** The name of the right pointing angle icon. */
116+
public static final DocPath RIGHT_SVG = DocPath.create("right.svg");
117+
112118
/** The name of the default jQuery directory. */
113119
public static final DocPath JQUERY_DIR = DocPath.create("jquery");
114120

@@ -338,7 +344,7 @@ private DocPath createModulePath(String moduleName, String path) {
338344
/** The name of the type search index js file. */
339345
public static final DocPath TYPE_SEARCH_INDEX_JS = DocPath.create("type-search-index.js");
340346

341-
/** The name of the image file for undo button on the search box. */
342-
public static final DocPath X_IMG = DocPath.create("x.png");
347+
/** The name of the svg file for undo button on the search box. */
348+
public static final DocPath X_SVG = DocPath.create("x.svg");
343349

344350
}

0 commit comments

Comments
 (0)