From: Dana Jansens Date: Sun, 25 Mar 2007 17:16:32 +0000 (+0000) Subject: better vertical centering for when "middle" placement is enabled for menus X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=afc015158aed10491e58a30d66728dffe36f3ae0;p=chaz%2Fopenbox better vertical centering for when "middle" placement is enabled for menus --- diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 30c332ce..289c5e30 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -222,7 +222,7 @@ void menu_frame_place_submenu(ObMenuFrame *self) y = self->parent->area.y + self->parent->title_h + self->parent_entry->area.y + overlap; if (config_menu_middle) - y = y - self->area.height/2 + self->item_h/2; + y = y - (self->area.height - (bwidth * 2) - self->item_h) / 2; menu_frame_move(self, x, y); }