summaryrefslogtreecommitdiff
path: root/components/rtgui/common/dc.c
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-06-11 06:18:46 +0000
committer[email protected] <[email protected]>2011-06-11 06:18:46 +0000
commit14c2f8c0399d2041d75fac43c42d87bf6a2e3b93 (patch)
treea7a5de9eb33296b476eeb813be8df28baf4384ef /components/rtgui/common/dc.c
parente8d7220682b061846844f98eb0f8d891c89c0e37 (diff)
add rtgui_listbox_set_current_item function; fix draw rect issue on the border; fix progress bar drawing issue; fix on_item issue in menu if the sub_menu is shown;
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1488 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/common/dc.c')
-rw-r--r--components/rtgui/common/dc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/rtgui/common/dc.c b/components/rtgui/common/dc.c
index a0d170de8f..5c7d130037 100644
--- a/components/rtgui/common/dc.c
+++ b/components/rtgui/common/dc.c
@@ -242,24 +242,24 @@ void rtgui_dc_draw_shaded_rect(struct rtgui_dc* dc, rtgui_rect_t* rect,
rtgui_dc_draw_hline(dc, rect->x1 + 1, rect->x2, rect->y1);
RTGUI_DC_FC(dc) = c2;
- rtgui_dc_draw_vline(dc, rect->x2, rect->y1, rect->y2);
- rtgui_dc_draw_hline(dc, rect->x1, rect->x2 + 1, rect->y2);
+ rtgui_dc_draw_vline(dc, rect->x2 - 1, rect->y1, rect->y2);
+ rtgui_dc_draw_hline(dc, rect->x1, rect->x2, rect->y2 - 1);
}
void rtgui_dc_draw_focus_rect(struct rtgui_dc* dc, rtgui_rect_t* rect)
{
int i;
- for (i = rect->x1; i <= rect->x2; i += 2)
+ for (i = rect->x1; i < rect->x2; i += 2)
{
rtgui_dc_draw_point(dc, i, rect->y1);
- rtgui_dc_draw_point(dc, i, rect->y2);
+ rtgui_dc_draw_point(dc, i, rect->y2 - 1);
}
- for (i = rect->y1; i <= rect->y2; i += 2)
+ for (i = rect->y1; i < rect->y2; i += 2)
{
rtgui_dc_draw_point(dc, rect->x1, i);
- rtgui_dc_draw_point(dc, rect->x2, i);
+ rtgui_dc_draw_point(dc, rect->x2 - 1, i);
}
}