diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-06-20 02:17:23 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-06-20 02:17:23 +0000 |
| commit | cd12a2eae5b5b72df08d588ac71d1f6cf6725dfb (patch) | |
| tree | 56413723ec877b3da05e2ece758b45b98d5b589c /openbox/menu_render.c | |
| parent | 349d0167dbee10ccb1c6200709286a5134ac7121 (diff) | |
simply the render interface by not requiring the setting of all the areas. only take a w and h in paint(). best font layout ever.
Diffstat (limited to 'openbox/menu_render.c')
| -rw-r--r-- | openbox/menu_render.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/openbox/menu_render.c b/openbox/menu_render.c index fcaf6869..a03f2caa 100644 --- a/openbox/menu_render.c +++ b/openbox/menu_render.c @@ -61,15 +61,6 @@ void menu_render_full(Menu *self) { self->item_h += theme_bevel * 2; items_h = self->item_h * MAX(nitems, 1); - if (self->label) { - RECT_SET(self->a_title->area, 0, 0, self->size.width, - self->title_h); - RECT_SET(self->a_title->texture[0].position, 0, 0, self->size.width, - self->title_h); - } - - RECT_SET(self->a_items->area, 0, 0, self->size.width, items_h); - XResizeWindow(ob_display, self->frame, self->size.width, MAX(self->title_h + items_h, 1)); if (self->label) @@ -81,8 +72,8 @@ void menu_render_full(Menu *self) { items_h); if (self->label) - paint(self->title, self->a_title); - paint(self->items, self->a_items); + paint(self->title, self->a_title, self->size.width, self->title_h); + paint(self->items, self->a_items, self->size.width, items_h); item_y = 0; for (it = self->entries; it; it = it->next) { @@ -125,17 +116,12 @@ void menu_entry_render(MenuEntry *self) break; } - RECT_SET(a->area, 0, 0, menu->size.width, - menu->item_h); - RECT_SET(a->texture[0].position, menu->bullet_w, - 0, menu->size.width - 2 * menu->bullet_w, - menu->item_h); - XMoveResizeWindow(ob_display, self->item, 0, self->y, menu->size.width, menu->item_h); + a->surface.parent = menu->a_items; a->surface.parentx = 0; a->surface.parenty = self->y; - paint(self->item, a); + paint(self->item, a, menu->size.width, menu->item_h); } |
