[oe-commits] [openembedded-core] 06/31: scripts/pybootchart/draw: Fix some bounding problems

git at git.openembedded.org git at git.openembedded.org
Wed May 8 18:04:14 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit ee102610c7892fb58fb4ddf5314163592bc882bb
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed May 8 11:50:14 2019 +0100

    scripts/pybootchart/draw: Fix some bounding problems
    
    The chart size extents were being incorrectly reported, not accounting for the
    width of the legend. Set a minimum width to account for that (its fixed size).
    
    Also stop printing the chart background off the bottom of the chart extents.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index b318441..add5c53 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -342,6 +342,10 @@ def extents(options, xscale, trace):
         if trace.mem_stats:
             h += meminfo_bar_h
 
+    # Allow for width of process legend and offset
+    if w < (720 + off_x):
+        w = 720 + off_x
+
     return (w, h)
 
 def clip_visible(clip, rect):
@@ -490,7 +494,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
     return curr_y
 
 def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
-    chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - header_h - leg_s + proc_h]
+    chart_rect = [off_x, curr_y+header_h, w, h - curr_y - 1 * off_y - header_h  ]
 
     draw_legend_box (ctx, "Configure", \
              TASK_COLOR_CONFIGURE, off_x  , curr_y + 45, leg_s)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list