diff options
Diffstat (limited to 'framebuffer/fbtk.c')
-rw-r--r-- | framebuffer/fbtk.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/framebuffer/fbtk.c b/framebuffer/fbtk.c index 0284b19a1..c564a9117 100644 --- a/framebuffer/fbtk.c +++ b/framebuffer/fbtk.c @@ -39,7 +39,12 @@ #include "framebuffer/bitmap.h" #include "framebuffer/image_data.h" -static struct css_style root_style; +static plot_font_style_t root_style = { + .family = PLOT_FONT_FAMILY_SANS_SERIF, + .size = 11, + .weight = 400, + .flags = FONTF_NONE, +}; enum fbtk_widgettype_e { FB_WIDGET_TYPE_ROOT = 0, @@ -601,13 +606,14 @@ fb_redraw_text(fbtk_widget_t *root, fbtk_widget_t *widget, void *pw) } if (widget->u.text.text != NULL) { + root_style.background = widget->bg; + root_style.foreground = widget->fg; + plot.text(bbox.x0 + 3, bbox.y0 + 17, - &root_style, widget->u.text.text, strlen(widget->u.text.text), - widget->bg, - widget->fg); + &root_style); } nsfb_release(root->u.root.fb, &bbox); @@ -1301,9 +1307,6 @@ fbtk_init(nsfb_t *fb) root->y = 0; root->u.root.rootw = fbtk_create_window(root, 0, 0, 0, 0); - root_style.font_size.value.length.unit = CSS_UNIT_PX; - root_style.font_size.value.length.value = 14; - return root; } |