rtgui/widgets/notebook: get rect only when needed
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1815 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
0803e79b53
commit
b38a97572c
|
@ -69,15 +69,14 @@ static void _rtgui_notebook_draw_bar(struct rtgui_notebook *notebook,
|
|||
static void _rtgui_notebook_ondraw(rtgui_notebook_t *notebook)
|
||||
{
|
||||
struct rtgui_dc* dc;
|
||||
rtgui_rect_t rect;
|
||||
|
||||
dc = rtgui_dc_begin_drawing(RTGUI_WIDGET(notebook));
|
||||
if (dc == RT_NULL) return;
|
||||
|
||||
rtgui_widget_get_rect(RTGUI_WIDGET(notebook), &rect);
|
||||
|
||||
if (notebook->count == 0)
|
||||
{
|
||||
rtgui_rect_t rect;
|
||||
rtgui_widget_get_rect(RTGUI_WIDGET(notebook), &rect);
|
||||
rtgui_dc_fill_rect(dc, &rect);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue