Skip to content

Commit

Permalink
gui: Do not fill storage bar unless device is internal/external storage
Browse files Browse the repository at this point in the history
  • Loading branch information
joel16 committed Jun 12, 2021
1 parent 66e2903 commit acc0011
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/source/gui/filebrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ namespace GUI {
float height = G2D::GetTextHeight(font);
intraFontPrintf(font, 40, 36, cfg.cwd.length() > 42? "%.42s..." : "%s", cfg.cwd.c_str());
G2D::DrawRect(40, 43, 400, 3, SELECTOR_COLOUR);
float fill = (static_cast<double>(item->used_storage)/static_cast<double>(item->total_storage)) * 400.f;
G2D::DrawRect(40, 43, fill, 3, TITLE_COLOUR);

if ((device == BROWSE_STATE_INTERNAL) || (device == BROWSE_STATE_EXTERNAL)) {
float fill = (static_cast<double>(item->used_storage)/static_cast<double>(item->total_storage)) * 400.f;
G2D::DrawRect(40, 43, fill, 3, TITLE_COLOUR);
}

if (item->entries.empty()) {
G2D::FontSetStyle(font, 1.0f, cfg.dark_theme? WHITE : BLACK, INTRAFONT_ALIGN_CENTER);
G2D::DrawText(240, 136, empty_dir.c_str());
Expand Down

0 comments on commit acc0011

Please sign in to comment.