[gthumb] header bar: align menus to the right for menu buttons on the right side
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] header bar: align menus to the right for menu buttons on the right side
- Date: Tue, 5 Nov 2019 10:40:19 +0000 (UTC)
commit 74c2a3891e2849bee0ab65e4d308e51740782adb
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Oct 20 12:59:21 2019 +0200
header bar: align menus to the right for menu buttons on the right side
extensions/export_tools/callbacks.c | 1 +
extensions/list_tools/callbacks.c | 2 ++
gthumb/gth-browser.c | 4 ++--
3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/extensions/export_tools/callbacks.c b/extensions/export_tools/callbacks.c
index 68760d5a..082f64a6 100644
--- a/extensions/export_tools/callbacks.c
+++ b/extensions/export_tools/callbacks.c
@@ -45,6 +45,7 @@ export_tools__gth_browser_construct_cb (GthBrowser *browser)
button = _gtk_menu_button_new_for_header_bar ("export-symbolic");
gtk_widget_set_tooltip_text (button, _("Export"));
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), menu);
+ gtk_widget_set_halign (GTK_WIDGET (gtk_menu_button_get_popup (GTK_MENU_BUTTON (button))),
GTK_ALIGN_CENTER);
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (gth_browser_get_headerbar_section (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_TOOLS)), button, FALSE, FALSE, 0);
}
diff --git a/extensions/list_tools/callbacks.c b/extensions/list_tools/callbacks.c
index 5da5ad05..fb059db3 100644
--- a/extensions/list_tools/callbacks.c
+++ b/extensions/list_tools/callbacks.c
@@ -173,6 +173,7 @@ list_tools__gth_browser_construct_cb (GthBrowser *browser)
g_signal_connect (button, "toggled", G_CALLBACK (tools_menu_button_toggled_cb), data);
gtk_widget_set_tooltip_text (button, _("Tools"));
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), menu);
+ gtk_widget_set_halign (GTK_WIDGET (gtk_menu_button_get_popup (GTK_MENU_BUTTON (button))),
GTK_ALIGN_CENTER);
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (gth_browser_get_headerbar_section (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_TOOLS)), button, FALSE, FALSE, 0);
@@ -182,6 +183,7 @@ list_tools__gth_browser_construct_cb (GthBrowser *browser)
g_signal_connect (button, "toggled", G_CALLBACK (tools_menu_button_toggled_cb), data);
gtk_widget_set_tooltip_text (button, _("Tools"));
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), menu);
+ gtk_widget_set_halign (GTK_WIDGET (gtk_menu_button_get_popup (GTK_MENU_BUTTON (button))),
GTK_ALIGN_CENTER);
gtk_widget_show (button);
gtk_box_pack_end (GTK_BOX (gth_browser_get_headerbar_section (browser,
GTH_BROWSER_HEADER_SECTION_VIEWER_EDIT)), button, FALSE, FALSE, 0);
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 74151675..00ba013b 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -4509,9 +4509,9 @@ gth_browser_init (GthBrowser *browser)
builder = _gtk_builder_new_from_resource ("gears-menu.ui");
menu = G_MENU_MODEL (gtk_builder_get_object (builder, "menu"));
- browser->priv->menu_button = _gtk_menu_button_new_for_header_bar (NULL);
- gtk_menu_button_set_direction (GTK_MENU_BUTTON (browser->priv->menu_button), GTK_ARROW_NONE);
+ browser->priv->menu_button = _gtk_menu_button_new_for_header_bar ("open-menu-symbolic");
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (browser->priv->menu_button), menu);
+ gtk_widget_set_halign (GTK_WIDGET (gtk_menu_button_get_popup (GTK_MENU_BUTTON
(browser->priv->menu_button))), GTK_ALIGN_END);
gtk_widget_show_all (browser->priv->menu_button);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), browser->priv->menu_button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]