diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-08-01 18:13:21 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-08-01 18:13:21 +1000 |
commit | 118f87afb1604a3defd0952512f7bb29d1b82f54 (patch) | |
tree | 2dd30145229412126939f3893e8846a8e5ce96ba | |
parent | ac2baed7e5d733ca93efb25e8795687ffa6e394c (diff) | |
download | uGFX-118f87afb1604a3defd0952512f7bb29d1b82f54.tar.gz uGFX-118f87afb1604a3defd0952512f7bb29d1b82f54.tar.bz2 uGFX-118f87afb1604a3defd0952512f7bb29d1b82f54.zip |
Fix GWIN lists font handling.
-rw-r--r-- | src/gwin/list.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |