aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-08-01 18:13:59 +1000
committerinmarket <andrewh@inmarket.com.au>2013-08-01 18:13:59 +1000
commit9ebd3530fa72937c183c4161b12d284cf10575f9 (patch)
tree8e4cedaa42a861daef10b7a85ffd4e1259131d53
parenta2632f0d31b1feb96649b6ae57800eae13e0bbcd (diff)
parent118f87afb1604a3defd0952512f7bb29d1b82f54 (diff)
downloaduGFX-9ebd3530fa72937c183c4161b12d284cf10575f9.tar.gz
uGFX-9ebd3530fa72937c183c4161b12d284cf10575f9.tar.bz2
uGFX-9ebd3530fa72937c183c4161b12d284cf10575f9.zip
Merge branch 'master' into fonts
-rw-r--r--demos/modules/gwin/widgets/main.c2
-rw-r--r--src/gwin/list.c6
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;