diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2013-11-15 18:08:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-18 12:44:07 +0000 |
commit | 65d43843b69416f17eac6092f69a3ac58a8a9c5d (patch) | |
tree | 1762f78d58b24e84052d851f5811a4fdf46e132f /scripts | |
parent | 80cce56e820dff38acecd0efd0f222f7d2fd4fba (diff) | |
download | poky-65d43843b69416f17eac6092f69a3ac58a8a9c5d.tar.gz |
pybootchartgui: Draw a lot less ticks
With this, one second ticks are only enabled if the width of a second is
five pixels or more. It is also possible to distinguish 1, 5 and 30
second ticks.
(From OE-Core rev: bd0bde6d04fd6cd9f8e7773d68da127144afa7de)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/pybootchartgui/pybootchartgui/draw.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index 6b15d64a6b..a22ac802f7 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py | |||
@@ -203,6 +203,12 @@ def draw_box_ticks(ctx, rect, sec_w): | |||
203 | ctx.set_line_cap(cairo.LINE_CAP_SQUARE) | 203 | ctx.set_line_cap(cairo.LINE_CAP_SQUARE) |
204 | 204 | ||
205 | for i in range(sec_w, rect[2] + 1, sec_w): | 205 | for i in range(sec_w, rect[2] + 1, sec_w): |
206 | if ((i / sec_w) % 10 == 0) : | ||
207 | ctx.set_line_width(1.5) | ||
208 | elif sec_w < 5 : | ||
209 | continue | ||
210 | else : | ||
211 | ctx.set_line_width(1.0) | ||
206 | if ((i / sec_w) % 30 == 0) : | 212 | if ((i / sec_w) % 30 == 0) : |
207 | ctx.set_source_rgba(*TICK_COLOR_BOLD) | 213 | ctx.set_source_rgba(*TICK_COLOR_BOLD) |
208 | else : | 214 | else : |
@@ -210,6 +216,7 @@ def draw_box_ticks(ctx, rect, sec_w): | |||
210 | ctx.move_to(rect[0] + i, rect[1] + 1) | 216 | ctx.move_to(rect[0] + i, rect[1] + 1) |
211 | ctx.line_to(rect[0] + i, rect[1] + rect[3] - 1) | 217 | ctx.line_to(rect[0] + i, rect[1] + rect[3] - 1) |
212 | ctx.stroke() | 218 | ctx.stroke() |
219 | ctx.set_line_width(1.0) | ||
213 | 220 | ||
214 | ctx.set_line_cap(cairo.LINE_CAP_BUTT) | 221 | ctx.set_line_cap(cairo.LINE_CAP_BUTT) |
215 | 222 | ||