removed bitmaps

pull/23/head
JuanJakobo 2020-10-25 18:54:28 +01:00
parent 8731980d85
commit c8955baaaf
1 changed files with 5 additions and 15 deletions

View File

@ -15,19 +15,15 @@ ListViewEntry::ListViewEntry(int page, irect rect) : _page(page), _position(rect
{
}
void ListViewEntry::draw(const Item &item)
void ListViewEntry::draw(const Item &item)
{
int fontHeight = 30;
_font = OpenFont("LiberationMono", fontHeight, 1);
SetFont(_font, BLACK);
irect pageButton = iRect(_position.x, _position.y, 100, _position.h - 30, ALIGN_LEFT);
if (item.getType() == IFILE)
{
FillAreaRect(&pageButton, BLACK);
DrawTextRect2(&pageButton, "bitmap");
DrawTextRect(pageButton.w, _position.y + fontHeight, _position.w, fontHeight, item.getFiletype().c_str(), ALIGN_LEFT);
DrawTextRect(_position.x, _position.y + fontHeight, _position.w, fontHeight, item.getFiletype().c_str(), ALIGN_LEFT);
if (item.isDownloaded())
{
DrawTextRect(_position.x, _position.y + 3 * fontHeight, _position.w, fontHeight, "Synced", ALIGN_RIGHT);
@ -37,16 +33,10 @@ void ListViewEntry::draw(const Item &item)
DrawTextRect(_position.x, _position.y + 3 * fontHeight, _position.w, fontHeight, "Download", ALIGN_RIGHT);
}
}
else
{
FillAreaRect(&pageButton, BLACK);
DrawTextRect2(&pageButton, "bitmap");
}
DrawTextRect(pageButton.w, _position.y, _position.w, fontHeight, item.getTitle().c_str(), ALIGN_LEFT);
DrawTextRect(pageButton.w, _position.y + 2 * fontHeight, _position.w, fontHeight, item.getLastEditDate().c_str(), ALIGN_LEFT);
DrawTextRect(pageButton.w, _position.y + 3 * fontHeight, _position.w, fontHeight, item.getSize().c_str(), ALIGN_LEFT);
DrawTextRect(_position.x, _position.y, _position.w, fontHeight, item.getTitle().c_str(), ALIGN_LEFT);
DrawTextRect(_position.x, _position.y + 2 * fontHeight, _position.w, fontHeight, item.getLastEditDate().c_str(), ALIGN_LEFT);
DrawTextRect(_position.x, _position.y + 3 * fontHeight, _position.w, fontHeight, item.getSize().c_str(), ALIGN_LEFT);
int line = (_position.y + _position.h) - 1;
DrawLine(0, line, ScreenWidth(), line, BLACK);