MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / getFileIcon

Method getFileIcon

src/components/UITheme.cpp:114–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114UIIcon UITheme::getFileIcon(const std::string& filename) {
115 if (filename.back() == '/') {
116 return Folder;
117 }
118 if (FsHelpers::hasEpubExtension(filename) || FsHelpers::hasXtcExtension(filename)) {
119 return Book;
120 }
121 if (FsHelpers::hasTxtExtension(filename) || FsHelpers::hasMarkdownExtension(filename)) {
122 return Text;
123 }
124 if (FsHelpers::hasBmpExtension(filename)) {
125 return Image;
126 }
127 return File;
128}
129
130int UITheme::getStatusBarHeight() {
131 const ThemeMetrics& metrics = UITheme::getInstance().getMetrics();

Callers

nothing calls this directly

Calls 5

hasXtcExtensionFunction · 0.85
hasMarkdownExtensionFunction · 0.85
hasBmpExtensionFunction · 0.85
hasEpubExtensionFunction · 0.50
hasTxtExtensionFunction · 0.50

Tested by

no test coverage detected