@@ -85,6 +85,10 @@ func (m *MaterialIconProvider) renderFileIconSVG(ctx reqctx.RequestContext, name
8585 return template .HTML (svg )
8686}
8787
88+ func (m * MaterialIconProvider ) FolderIcon (ctx reqctx.RequestContext , isOpen bool ) template.HTML {
89+ return svg .RenderHTML ("material-folder-generic" , 16 , BasicThemeFolderIconName (isOpen ))
90+ }
91+
8892func (m * MaterialIconProvider ) FileIcon (ctx reqctx.RequestContext , entry * git.TreeEntry ) template.HTML {
8993 if m .rules == nil {
9094 return BasicThemeIcon (entry )
@@ -102,14 +106,14 @@ func (m *MaterialIconProvider) FileIcon(ctx reqctx.RequestContext, entry *git.Tr
102106 if name == "folder" {
103107 // the material icon pack's "folder" icon doesn't look good, so use our built-in one
104108 // keep the old "octicon-xxx" class name to make some "theme plugin selector" could still work
105- return svg . RenderHTML ( "material-folder-generic" , 16 , "octicon-file-directory-fill" )
109+ return m . FolderIcon ( ctx , false )
106110 }
107111 if iconSVG , ok := m .svgs [name ]; ok && iconSVG != "" {
108112 // keep the old "octicon-xxx" class name to make some "theme plugin selector" could still work
109113 extraClass := "octicon-file"
110114 switch {
111115 case entry .IsDir ():
112- extraClass = "octicon-file-directory-fill"
116+ extraClass = BasicThemeFolderIconName ( false )
113117 case entry .IsSubModule ():
114118 extraClass = "octicon-file-submodule"
115119 }
0 commit comments