diff options
| author | bernard.xiong <[email protected]> | 2010-08-19 14:16:36 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-08-19 14:16:36 +0000 |
| commit | 188bad3b6fd44292a7e5fe702ee21ca9c8a8241f (patch) | |
| tree | 84c681a47323ff6111be8a3455f752ca57826461 /components/rtgui/widgets/widget.c | |
| parent | c188bba485eeed448d8dda74df4ebd2a62e93d84 (diff) | |
fix widget clip update when set widget's extent.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@866 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/widgets/widget.c')
| -rw-r--r-- | components/rtgui/widgets/widget.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/rtgui/widgets/widget.c b/components/rtgui/widgets/widget.c index 81ee2d797b..81968f929d 100644 --- a/components/rtgui/widgets/widget.c +++ b/components/rtgui/widgets/widget.c @@ -131,6 +131,11 @@ void rtgui_widget_set_rect(rtgui_widget_t* widget, rtgui_rect_t* rect) /* reset clip info */ rtgui_region_init_with_extents(&(widget->clip), rect); + if ((widget->parent != RT_NULL) && (widget->toplevel != RT_NULL)) + { + /* update widget clip */ + rtgui_widget_update_clip(widget); + } } #ifndef RTGUI_USING_SMALL_SIZE |
