Skip to content

Commit

Permalink
Properly align button menu positions on vertical panels
Browse files Browse the repository at this point in the history
  • Loading branch information
lukefromdc committed Feb 6, 2019
1 parent 14fce6f commit 4a6c3df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mate-panel/panel-menu-button.c
Expand Up @@ -471,9 +471,14 @@ panel_menu_button_popup_menu (PanelMenuButton *button,
screen = gtk_window_get_screen (GTK_WINDOW (button->priv->toplevel)); screen = gtk_window_get_screen (GTK_WINDOW (button->priv->toplevel));
gtk_menu_set_screen (GTK_MENU (button->priv->menu), screen); gtk_menu_set_screen (GTK_MENU (button->priv->menu), screen);


/*using these same anchor points lets default "anchor-hints" properly position the menu
*so that on a vertical panel the menu aligns with the outside edge of a menu button
*placed at the top or bottom of a left or a right panel
*/

gtk_menu_popup_at_widget (GTK_MENU (button->priv->menu), gtk_menu_popup_at_widget (GTK_MENU (button->priv->menu),
GTK_WIDGET (button), GTK_WIDGET (button),
GDK_GRAVITY_SOUTH_WEST, GDK_GRAVITY_NORTH_WEST,
GDK_GRAVITY_NORTH_WEST, GDK_GRAVITY_NORTH_WEST,
NULL); NULL);


Expand Down

0 comments on commit 4a6c3df

Please sign in to comment.