]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
pybootchartgui: fix width max usage in draw_label_in_box
authorJose Quaresma <quaresma.jose@gmail.com>
Mon, 10 Jul 2023 22:24:20 +0000 (22:24 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 14 Jul 2023 16:31:02 +0000 (17:31 +0100)
The function draw_label_in_box chooses the correct side based on
the maximum width length argument 'maxx'.
Currently the labels are always drawn on the left side and this
is because we are inadvertently passing the 'maxx' argument wrong.

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/pybootchartgui/pybootchartgui/draw.py

index e2f9c5dc6c8e54761196611916573c8288c82098..3d1ff695c106ed67a8a9eea2facd86d002e7ced5 100644 (file)
@@ -684,7 +684,7 @@ def render_processes_chart(ctx, options, trace, curr_y, width, h, sec_w):
 
             # Show elapsed time for each task
             process = "%ds %s" % (elapsed_time, process)
-            draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h)
+            draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, width)
 
             y = y + proc_h