diff options
| -rw-r--r-- | demos/modules/gwin/widgets/main.c | 2 | ||||
| -rw-r--r-- | src/gwin/list.c | 6 | 
2 files changed, 4 insertions, 4 deletions
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c index f0187e66..31b65a65 100644 --- a/demos/modules/gwin/widgets/main.c +++ b/demos/modules/gwin/widgets/main.c @@ -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); diff --git a/src/gwin/list.c b/src/gwin/list.c index cf567a81..5407cb36 100644 --- a/src/gwin/list.c +++ b/src/gwin/list.c @@ -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;  | 
