[Github-comments] [geany/geany-plugins] Fixed document list menu position bug (#895)

PatrickGMM notifications at xxxxx
Sat Aug 10 22:32:36 UTC 2019


PatrickGMM commented on this pull request.



> +		int wx_root, wy_root, width;
+		window = gtk_widget_get_window (gtk_widget_get_ancestor(widget, GTK_TYPE_TOOLBAR));
+#if GTK_CHECK_VERSION(3, 0, 0)
+		gdk_window_get_geometry(window, &wx, &wy, &width, NULL);
+#else
+		gdk_window_get_geometry(window, &wx, &wy, &width, NULL, NULL);
+#endif
+		gdk_window_get_root_coords(window, wx, wy, &wx_root, &wy_root);
+
+#if GTK_CHECK_VERSION(3, 0, 0)
+		gtk_widget_get_preferred_size(widget, &widget_req, NULL);
+#else
+		gtk_widget_size_request(widget, &widget_req);
+#endif
+		/* Approximate the horizontal location of the overflow menu button */
+		/* TODO: See if there's a way to find the exact location */

Never mind on being able to use the last item in the toolbar as the overflow drop-down. I made an incorrect assumption in my previous statement. There doesn't seem to be a way to get the toolbar widget as it's drawn.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/895#discussion_r312716892
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190810/ba8a6698/attachment.html>


More information about the Github-comments mailing list