ses_layout_draw()
authoryu.dongliang <18588496441@163.com>
Sun, 5 Nov 2023 09:34:55 +0000 (17:34 +0800)
committeryu.dongliang <18588496441@163.com>
Sun, 5 Nov 2023 09:34:55 +0000 (17:34 +0800)
ses_layout.c

index 1b67e5992a0e92afc1194d8c4bc4bdc4f6ee394a..c274cdb6548276b119b45ea199fd87922236ce99 100644 (file)
@@ -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);