[oe-commits] [openembedded-core] 05/27: pybootchartgui/draw.py: allow moving process chart up and down

git at git.openembedded.org git at git.openembedded.org
Wed Dec 7 10:38:32 UTC 2016


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

commit b6bb690728c329ae448f89a1b68298c6dd8a573a
Author: Patrick Ohly <patrick.ohly at intel.com>
AuthorDate: Wed Nov 30 10:50:02 2016 +0100

    pybootchartgui/draw.py: allow moving process chart up and down
    
    Substracting curr_y when determining the hight of the process chart is
    wrong because the height is independent of the position where the
    chart is about to be drawn. It happens to work at the moment because
    curr_y is always 10 when render_processes_chart() gets called. But it
    leads to a negative height when other charts are drawn above it, and
    then the grid gets drawn on top of those other charts.
    
    Substracting some constant is relevant because otherwise the box is
    slightly larger than the process bars. Not sure exactly where that
    comes from (text height?); leg_s seems a suitable constant and happens
    to be 10, so everything still gets rendered exactly as before.
    
    Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 8c574be..2b5907b 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -415,7 +415,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 - (curr_y+header_h) + proc_h]
+        chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - header_h - leg_s + proc_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