Commit Graph

41 Commits

Author SHA1 Message Date
Benjamin Otte
4850271ae8 API: Remove gtk_cairo_should_draw_window()
The answer is: Yes.
2016-11-23 18:48:38 +01:00
Benjamin Otte
c9a313a125 revealer: Port to no-window widget 2016-11-03 03:00:15 +01:00
Timm Bäder
9992a616ef widget: Use ::measure vfunc to measure size
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Benjamin Otte
73ef9e1438 revealer: Use gdk_window_new_child() 2016-10-18 00:22:35 +02:00
Benjamin Otte
1518fe0a8f API: stylecontext: Remove state argument from getters
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Benjamin Otte
662001b60a API: Remove ability to set visuals on windows
And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are
gone.

We now always use the RGBA visual (if available) and otherwise fall back
to the system visual.
2016-10-16 18:17:21 +02:00
Matthieu Gautier
82aa83b0f6 revealer: emit notify::child-revealed when animation stops
Depending of float rounding during target calculation, the size of the
GtkRevealer can be set to zero will the animation is not finished.
If the GtkRevealer is in a GtkPaned, it will be hidden and so the animation
will be stopped before it is finished.

In this case, force the emission of the child-revealed signal to let
client code know the animation is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=765973
2016-05-06 16:09:12 -04:00
Matthias Clasen
ff0107a4ac Use getter for gtk-enable-animations 2016-05-01 00:39:18 -04:00
Matt Watson
2ff62595ed revealer: port to progress tracker 2016-04-08 16:09:30 -07:00
Timm Bäder
e2e330db1a revealer: Don't use TRANSITION_NONE for disabled animations
If animations are disabled, the only difference we need to make is that
we don't have to start the transition. Size requests should remain the
same.

https://bugzilla.gnome.org/show_bug.cgi?id=762996
2016-03-03 18:54:09 +01:00
Timm Bäder
0c25c5d43d revealer: Don't report >0 preferred width...
... if the child is concealed and the transition type is set to NONE.
In this case, both preferred width and preferred height should be 0, but
we still can't use that to allocate a size for the child, so care about
the minimum size of the child in gtk_revealer_get_child_allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=761760
2016-02-23 20:45:45 -05:00
Timm Bäder
d85b3fc60d revealer: Propagate draw event 2016-01-08 09:38:32 +01:00
Matthias Clasen
f0a2f9ef96 revealer: Add CSS node docs 2015-12-15 08:41:16 -05:00
Matthias Clasen
d40576fb3e revealer: Use an element name 2015-11-04 12:05:03 -05:00
Timm Bäder
d0779db1e1 GtkRevealer: Remove useless _start_animation call
The call just passed priv->target_pos, but _start_animation directly
returns if the given target is priv->target_pos (see line 627).
2015-10-16 15:07:49 +02:00
Alexander Larsson
d5f1754981 gtk: Stop setting GDK_EXPOSURE_MASK on random widgets
These days exposure happens only on the native windows (generally the
toplevel window) and is propagated down recursively. The expose event
is only useful for backwards compat, and in fact, for double buffered
widgets we totally ignore the event (and non-double buffering breaks
on wayland).

So, by not setting the mask we avoid emitting these events and then
later ignoring them.

We still keep it on eventbox, fixed and layout as these are used
in weird ways that want backwards compat.
2015-09-14 11:01:13 +02:00
Carlos Soriano
0f935a0483 gtkrevealer: fix preferred width calculation
A typo which was using minimum_width for natural_width and viceversa.
2015-07-07 22:49:45 +02:00
Cosimo Cecchi
f89c86df52 revealer: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Carlos Soriano
c37f569ae8 gtkrevealer: add css padding support
Add css padding support to GtkRevealer.

As a future work, GtkRevealer still needs to support the border
property.

https://bugzilla.gnome.org/show_bug.cgi?id=750338
2015-06-04 23:18:17 -04:00
Matthias Clasen
fae5302eae GtkRevealer: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:51 -04:00
Matthias Clasen
07e180fef0 GtkRevealer: Convert to g_object_class_install_properties 2014-06-09 13:30:51 -04:00
Benjamin Otte
c0f556ab71 revealer: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:28 +02:00
Benjamin Otte
73aa7bd2f5 widgets: Remove (GtkTickCallback) casts
Instead, make the functions conform to the prototype, so that casting
isn't needed.
2014-04-29 19:35:29 +02:00
Benjamin Otte
9add8e261f revealer: Pass correct size to child hfw function
The refactoring in b9e37f8d2d broke this.

https://bugzilla.gnome.org/show_bug.cgi?id=724999
2014-02-23 15:40:46 +01:00
Benjamin Otte
b9e37f8d2d revealer: Allocate extra size to child
Do not constrain the child widget to its preferred size when the
revealer is larger.

https://bugzilla.gnome.org/show_bug.cgi?id=724742
2014-02-20 02:10:07 +01:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
c788b72768 docs: fix typo in property syntax 2014-01-21 18:57:37 -05:00
Matthias Clasen
087b61f653 GtkRevealer: Fix size allocation with disabled animation
When animation is disabled, we use 'none' as the effective
transition type. So far, this transition type failed to change
the size request, causing the revealer to always take up the
space of the child, even when the child is not shown.

https://bugzilla.gnome.org/show_bug.cgi?id=719568
2013-12-01 21:45:17 -05:00
Christian Persch
bf9ed44aa6 revealer: Respect gtk-enable-animations setting
https://bugzilla.gnome.org/show_bug.cgi?id=712632
2013-11-18 23:01:11 -05:00
Jasper St. Pierre
81538d492e revealer: Use the same transition animation as GtkStack 2013-10-09 18:29:41 -04:00
Matthias Clasen
6aa56979dc More documentation fixes 2013-09-17 01:28:39 -04:00
Stefano Facchini
b2b8c4d4bc revealer: clamp minimum size to natural one
Instead of just setting them equal.

https://bugzilla.gnome.org/show_bug.cgi?id=706938
2013-08-28 10:34:11 +02:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Alexander Larsson
09d22284f7 revealer: Use new private model, remove priv pointer 2013-07-02 13:42:43 +02:00
Chun-wei Fan
da31982379 Fix build on C89 compilers
-Avoid defining variables in the middle of the block
-Include fallback-c89.c in gtkrevealer.c in place of math.h as
 fallback-c89.c includes math.h itself, and is needed for round()
2013-05-28 13:36:54 +08:00
Matthias Clasen
210451e86f Minor doc comment fix 2013-05-01 21:27:06 -04:00
Cosimo Cecchi
06c8e8fa43 docs: fix some typos in newly introduced methods 2013-04-24 13:10:54 -04:00
Matthias Clasen
8ff96b3bb2 Do rtl flipping for GtkRevealer transitions 2013-04-22 12:42:39 -04:00
Matthias Clasen
aec62e1c10 Add docs for GtkRevealer 2013-04-22 12:42:38 -04:00
Matthias Clasen
d7f43c30a3 GtkRevealer: Add a fading animation
Using a container for this is not necessarily the most
elegant solution, but it lets us reuse the animation
machinery in GtkRevealer.
2013-04-22 12:42:38 -04:00
Matthias Clasen
443459b52e Add GtkRevealer
This is a widget that can hide or show (ie reveal) its child
in an animated fashion.

This widget was initially developed in libgd.
2013-04-22 12:42:37 -04:00