src/browsedialog.cpp |
60 | 60 | |
61 | 61 | const int topBarHeight = gmenu2x->skinConfInt["topBarHeight"]; |
62 | 62 | rowHeight = gmenu2x->font->getHeight() + 1; // gp2x=15+1 / pandora=19+1 |
| 63 | rowHeight = constrain(rowHeight, 20, 40); |
63 | 64 | numRows = (gmenu2x->resY - topBarHeight - 20) / rowHeight; |
64 | 65 | clipRect = (SDL_Rect) { |
65 | 66 | 0, |
... | ... | |
271 | 272 | icon = iconFile; |
272 | 273 | } |
273 | 274 | 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, |
275 | 276 | Font::HAlignLeft, Font::VAlignMiddle); |
276 | 277 | |
277 | 278 | if (ts.available() && ts.pressed() |
src/selector.cpp |
81 | 81 | tie(top, height) = gmenu2x->getContentArea(); |
82 | 82 | |
83 | 83 | int fontheight = gmenu2x->font->getHeight(); |
| 84 | if (link->getSelectorBrowser()) |
| 85 | fontheight = constrain(fontheight, 20, 40); |
84 | 86 | unsigned int nb_elements = height / fontheight; |
85 | 87 | |
86 | 88 | bg.convertToDisplayFormat(); |
... | ... | |
126 | 128 | iY = i-firstElement; |
127 | 129 | if (fl.isDirectory(i)) { |
128 | 130 | 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); |
130 | 134 | } else |
131 | 135 | 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); |
134 | 138 | } |
135 | 139 | gmenu2x->s->clearClipRect(); |
136 | 140 | |