Merge branch 'master' into fonts

This commit is contained in:
inmarket 2013-08-01 18:13:59 +10:00
commit 9ebd3530fa
2 changed files with 4 additions and 4 deletions

View File

@ -181,7 +181,7 @@ static void createWidgets(void) {
gwinListAddItem(ghList2, "Item 8", FALSE); gwinListAddItem(ghList2, "Item 9", FALSE);
gwinListAddItem(ghList2, "Item 10", FALSE); gwinListAddItem(ghList2, "Item 11", FALSE);
gwinListAddItem(ghList2, "Item 12", FALSE); gwinListAddItem(ghList2, "Item 13", FALSE);
wi.g.x = 0+2*(LIST_WIDTH+1); wi.text = "L3"; ghList3 = gwinListCreate(NULL, &wi, FALSE);
wi.g.x = 0+2*(LIST_WIDTH+1); wi.text = "L3"; ghList3 = gwinListCreate(NULL, &wi, TRUE);
gwinListAddItem(ghList3, "Item 0", FALSE); gwinListAddItem(ghList3, "Item 1", FALSE);
gwinListAddItem(ghList3, "Item 2", FALSE); gwinListAddItem(ghList3, "Item 3", FALSE);
gdispImageSetMemoryReader(&imgYesNo, image_yesno);

View File

@ -89,7 +89,7 @@ static void gwinListDefaultDraw(GWidgetObject* gw, void* param) {
#endif
ps = (gw->g.flags & GWIN_FLG_ENABLED) ? &gw->pstyle->enabled : &gw->pstyle->disabled;
iheight = gdispGetFontMetric(gwinGetDefaultFont(), fontHeight) + TEXTGAP;
iheight = gdispGetFontMetric(gw->g.font, fontHeight) + TEXTGAP;
x = 1;
// the scroll area
@ -139,7 +139,7 @@ static void gwinListDefaultDraw(GWidgetObject* gw, void* param) {
}
}
#endif
gdispFillStringBox(gw->g.x+x, gw->g.y+y, iwidth, iheight, qi2li->text, gwinGetDefaultFont(), ps->text, fill, justifyLeft);
gdispFillStringBox(gw->g.x+x, gw->g.y+y, iwidth, iheight, qi2li->text, gw->g.font, ps->text, fill, justifyLeft);
}
// Fill any remaining item space
@ -158,7 +158,7 @@ static void gwinListDefaultDraw(GWidgetObject* gw, void* param) {
coord_t iheight;
(void) x;
iheight = gdispGetFontMetric(gwinGetDefaultFont(), fontHeight) + TEXTGAP;
iheight = gdispGetFontMetric(gw->g.font, fontHeight) + TEXTGAP;
pgsz = (gw->g.height-2)/iheight;
if (pgsz < 1) pgsz = 1;