]> Dogcows Code - chaz/openbox/commitdiff
better vertical centering for when "middle" placement is enabled for menus
authorDana Jansens <danakj@orodu.net>
Sun, 25 Mar 2007 17:16:32 +0000 (17:16 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 25 Mar 2007 17:16:32 +0000 (17:16 +0000)
openbox/menuframe.c

index 30c332ce344322b51bf45abff7fa8b455a64c58c..289c5e30e2d1f8cbef2994bbf81cbc4aa255d407 100644 (file)
@@ -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);
 }
This page took 0.024636 seconds and 4 git commands to generate.