Commit Graph

21 Commits

Author SHA1 Message Date
Matthias Clasen
6ab8ab87c8 Reimplement GtkPopover 2019-05-28 20:25:13 +00:00
Matthias Clasen
cbab83b843 popover: Cosmetics
Use the same amount of padding as everywhere else.
2019-05-19 20:34:49 +00:00
Timm Bäder
b2f04be04c popover: Remove priv pointer 2018-03-30 23:15:04 +02:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Timm Bäder
3573cdc0cd popover: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
a6b9b3648d GtkPopover: Deprecate transitions-enabled
The effect of transitions-enabled=true can now be
achieved using gtk_popover_popup/popdown and the effect
of transitions-enabled=false can be achieved using
gtk_widget_show/hide.

https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
Timm Bäder
1f7b6c1d6f GtkPopover: Add gtk_popover_popdown/popup
Since not chaining up in gtk_widget_show/gtk_widget_hide is not allowed,
we can't just implicitly delay the hiding in GtkPopover's hide
implementation. Fix this by introducing gtk_popover_popup() and
gtk_popover_popdown() to show or hide a popover with transition and
revert GtkPopover's show/hide implementation to apply their effect
without the transition.

https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
Matthias Clasen
e626038467 popover: Make it possible to constrain to toplevel
Under X11, popovers are always constrained to the toplevel
window. Under Wayland, they aren't. This commit adds a
property that allows to explicitly constrain popovers to
the toplevel, giving them the same behavior under Wayland
as under X11.

https://bugzilla.gnome.org/show_bug.cgi?id=757474
2015-12-01 17:26:25 -05:00
Matthias Clasen
e1c1fc59e5 Add default widget handling to popovers
Add a new API, gtk_popover_set_default_widget, that can be
used to make a widget act as default while the popover is
shown. This is useful in dialog-like popovers.

http://bugzilla.gnome.org/show_bug.cgi?id=747664
2015-05-02 20:34:28 -04:00
Carlos Garnacho
cff1694c99 popover: Add show/hide transitions
These have the same visual effect and timing than the gnome-shell ones.
During the hide animation, the popover has been made to take focus
elsewhere, and refuse to take any pointer/keyboard input until the popover
is shown again.

This has been based on work from Timm Bäder.

https://bugzilla.gnome.org/show_bug.cgi?id=741405
2015-02-20 14:44:17 +01:00
Matthias Clasen
2d1c7b8937 Trivial formatting fix 2014-11-14 06:16:41 -05:00
Matthias Clasen
72e2094472 Drop with_separators from gtk_popover_bind_model
The with_separators argument does not really make sense
for popovers, it was just copied from the menu implementation.
Drop it now, before it becomes part of the public API.
2014-02-17 06:52:38 -05:00
Juan R. García Blanco
f3c9f86d14 popover: Make gtk_popover_bind_model() public
This is needed for the C++ bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=724503
2014-02-17 06:52:23 -05:00
Matthias Clasen
444d04a360 More coding style cleanups 2014-02-09 01:22:07 -05:00
Matthias Clasen
add7a83452 Trivial formatting fix 2014-02-08 22:18:15 -05:00
Juan R. García Blanco
552c29b488 GtkPopover: use GdkRectangle instead of cairo_rectangle_int_t
cairo_rectangle_int_t replaced by GdkRectangle whenever it is used.
Also, rect parameter in public method gtk_popover_set_pointing_to
made const.

Bug #723394
2014-02-08 21:53:07 +01:00
Matthias Clasen
2fea2d4dbd Populate popovers from menu models
This adds a new function, gtk_popover_new_from_model, which creates
a popover and populates it with suitable content according to the
menu model. The current implementation uses GtkModelButton for the
individual items, and a GtkStack for submenus.

https://bugzilla.gnome.org/show_bug.cgi?id=723014
2014-02-07 15:11:51 -05:00
Carlos Garnacho
99f16d25a7 popover: Add ::closed signal
This signal is emitted when the popover is dismissed either through
API or user interaction, somewhat more friendly than connecting to
::unmap.
2014-02-06 15:32:48 +01:00
Carlos Garnacho
13b37bd4e0 popover: Add padding pointers to GtkPopoverClass 2014-02-06 15:32:40 +01:00
Carlos Garnacho
1d495cbafd popover: Add a "modal" boolean property to GtkPopover
This property is TRUE by default, when a popover is modal, it
will automatically set a GTK+ grab on the popover, and grab
the keyboard focus into the popover.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
caeb896096 Introduce GtkPopover
Now that the GtkBubbleWindow object has been cleaned up and made
more generic, rename it as GtkPopover and make it public.
2014-01-22 17:10:04 +01:00