Date:2014-01-16 16:01:33 (10 years 2 months ago)
Author:Paul Cercueil
Commit:e63ad99ba92e24ae108eb82db0a98e5073834d2c
Message:Set row size to 20px minimum in file list if browsing directories

Files: src/browsedialog.cpp (2 diffs)
src/selector.cpp (2 diffs)

Change Details

src/browsedialog.cpp
6060
6161    const int topBarHeight = gmenu2x->skinConfInt["topBarHeight"];
6262    rowHeight = gmenu2x->font->getHeight() + 1; // gp2x=15+1 / pandora=19+1
63    rowHeight = constrain(rowHeight, 20, 40);
6364    numRows = (gmenu2x->resY - topBarHeight - 20) / rowHeight;
6465    clipRect = (SDL_Rect) {
6566        0,
...... 
271272            icon = iconFile;
272273        }
273274        icon->blit(gmenu2x->s, 5, offsetY);
274        gmenu2x->s->write(gmenu2x->font, (*fl)[i], 24, offsetY + 8,
275        gmenu2x->s->write(gmenu2x->font, (*fl)[i], 24, offsetY + rowHeight / 2,
275276                Font::HAlignLeft, Font::VAlignMiddle);
276277
277278        if (ts.available() && ts.pressed()
src/selector.cpp
8181    tie(top, height) = gmenu2x->getContentArea();
8282
8383    int fontheight = gmenu2x->font->getHeight();
84    if (link->getSelectorBrowser())
85        fontheight = constrain(fontheight, 20, 40);
8486    unsigned int nb_elements = height / fontheight;
8587
8688    bg.convertToDisplayFormat();
...... 
126128            iY = i-firstElement;
127129            if (fl.isDirectory(i)) {
128130                gmenu2x->sc["imgs/folder.png"]->blit(gmenu2x->s, 4, top + (iY * fontheight));
129                gmenu2x->s->write(gmenu2x->font, fl[i], 21, top+(iY * fontheight), Font::HAlignLeft, Font::VAlignMiddle);
131                gmenu2x->s->write(gmenu2x->font, fl[i], 21,
132                            top + (iY * fontheight) + (fontheight / 2),
133                            Font::HAlignLeft, Font::VAlignMiddle);
130134            } else
131135                gmenu2x->s->write(gmenu2x->font, titles[i - fl.dirCount()], 4,
132                            top + (iY * fontheight),
133                            Font::HAlignLeft, Font::VAlignTop);
136                            top + (iY * fontheight) + (fontheight / 2),
137                            Font::HAlignLeft, Font::VAlignMiddle);
134138        }
135139        gmenu2x->s->clearClipRect();
136140

Archive Download the corresponding diff file



interactive