From e76cd77c561149c3aa259715571d68729672cae6 Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Sat, 3 Jul 2010 15:24:40 +0000 Subject: [PATCH] fix win drawing issue. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@786 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/rtgui/common/rtgui_theme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/rtgui/common/rtgui_theme.c b/components/rtgui/common/rtgui_theme.c index 2cb4628d9..2b797bfe5 100644 --- a/components/rtgui/common/rtgui_theme.c +++ b/components/rtgui/common/rtgui_theme.c @@ -105,9 +105,9 @@ void rtgui_theme_draw_win(struct rtgui_topwin* win) delta = 64 / (float)(rect.x2 - rect.x1); } - for (index = rect.x1; index < rect.x2; index ++) + RTGUI_WIDGET_FOREGROUND(RTGUI_WIDGET(win->title)) = RTGUI_RGB(r, g, b); + for (index = rect.x1; index < rect.x2 + 1; index ++) { - RTGUI_WIDGET_FOREGROUND(RTGUI_WIDGET(win->title)) = RTGUI_RGB(r, g, b); rtgui_dc_draw_vline(dc, index, rect.y1, rect.y2); r += delta; g += delta; b += delta; }