panel_items : fixed hide/unhide of baterry and systray

git-svn-id: http://tint2.googlecode.com/svn/trunk@560 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
thilor77
2010-09-22 19:33:10 +00:00
parent f8e31774b6
commit b4fb372f52
5 changed files with 37 additions and 18 deletions

View File

@@ -123,8 +123,8 @@ void size_by_content (Area *a)
if (a->_resize(a)) {
// 'size' changed => 'resize = 1' on the parent and redraw object
((Area*)a->parent)->resize = 1;
a->redraw = 1;
}
a->redraw = 1;
}
}
}
@@ -317,6 +317,26 @@ void set_redraw (Area *a)
set_redraw(l->data);
}
void hide(Area *a)
{
Area *parent = (Area*)a->parent;
a->on_screen = 0;
parent->resize = 1;
if (panel_horizontal)
a->width = 0;
else
a->height = 0;
}
void show(Area *a)
{
Area *parent = (Area*)a->parent;
a->on_screen = 1;
parent->resize = 1;
a->resize = 1;
}
void draw (Area *a)
{