From: yu.dongliang <18588496441@163.com> Date: Sun, 5 Nov 2023 09:34:55 +0000 (+0800) Subject: ses_layout_draw() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=604a2c9cc67ec743167df57d599a55f58ed85b88;p=ses.git ses_layout_draw() --- diff --git a/ses_layout.c b/ses_layout.c index 1b67e59..c274cdb 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -1448,7 +1448,6 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_ } uint8_t text[64]; - snprintf(text, sizeof(text) - 1, "%ld", el->id); cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size (cr, 24); @@ -1456,7 +1455,9 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_ for (k = 0; k < el->n_lines; k++) { l = el->lines[k]; - cairo_move_to (cr, l->x0 - 20, l->y0 + 5); + snprintf(text, sizeof(text) - 1, "%ld,%ld", el->id, k); + + cairo_move_to (cr, l->x0 - 30, l->y0 - 5); cairo_show_text(cr, text); cairo_move_to(cr, l->x0, l->y0);