2

Basically, I want something that acts like a GtkMenu when it comes to focus and placement, but with an arbitrary widget (button, slider, tree, calendar... anything, really) inside. Putting the widget inside a GtkMenuItem doesn't work - that causes a lot of padding, and it's the MenuItem that receives click events instead of the widget. Is this possible?

Kyuuhachi
  • 651
  • 6
  • 15
  • Which version of Gtk? Gtk3.12 and later has a [Popover](https://developer.gnome.org/gtk3/stable/GtkPopover.html). – theGtknerd Aug 10 '17 at 01:12
  • Package version is 3.22.17-1, so I'm guessing 3.22. And that popover is ugly as hell, has extra borders and padding, has dumb animations when .hide()ing, and seems to be unable to leave the window (even with Gtk.PopoverConstraint.None). – Kyuuhachi Aug 10 '17 at 02:16
  • Hmmm... Your experience is different from mine. Could you post me some code (or pictures) that demonstrates your problems? My popovers have no animations or extra padding. They have a border but a widget without a border looks weird (to me anyway). – theGtknerd Aug 10 '17 at 02:23
  • This is how my Popovers [look](http://imgur.com/gallery/2bf19ek). – theGtknerd Aug 10 '17 at 02:32
  • Yeah, that looks just like mine (except I use a different theme). It has a few pixels of padding between the outer border and the content (clearly visible on calendars), the arrow is tolerable but I'd prefer not to have it, it takes a second to disappear (even though the documentation *says* it shouldn't do that if I use `.hide()`)it's not rendered outside the window, and its close-on-lost-focus is window-local as well. Unlike the GtkMenu, which is rectangular, interacts properly with focus, and has no shadows or other eye-liquorice (that is, eye-candy that I don't like). – Kyuuhachi Aug 10 '17 at 02:54
  • You could always use a titleless, modal window and position it exactly where you need it. Then you would have full control of what is going on. This is what I did before the popover. Since your requirements are not obvious to me, I can't really post any code. – theGtknerd Aug 10 '17 at 11:21
  • Yeah, that's what I'm doing. It works pretty well, but since one of the widgets has a normal Menu, that one acts a bit different, which is annoying. After playing around a bit, I find I prefer the behavior of my own, though (obviously, since I made it to fit my needs), so the opposite of this question would probably be more useful... – Kyuuhachi Aug 10 '17 at 13:17

0 Answers0