Benjamin Otte
73b4a62f51
snapshot: Redo debug messages
...
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.
2018-04-24 04:06:58 +02:00
Benjamin Otte
2b35332fd6
cssimage: Implement dynamicity for cross-fades
2018-03-16 06:04:44 +01:00
Benjamin Otte
83fb7a649f
css: Merge GtkStyleProviderPrivate into GtkStyleProvider
...
This is just lots of renaming.
The interface remains private, so the public API does not change, apart
from removing the definition of the Interface object to avoid
subclassing.
2017-10-31 04:33:54 +01:00
Benjamin Otte
b58de2d16c
snapshot: Redo pop() API
...
gtk_snapshot_pop() => removed
gtk_snapshot_pop_and_append() => gtk_snapshot_pop()
So now there is no way to get a rendernode out of the snapshotting API
until you gtk_snapshot_finish().
2017-01-13 03:38:36 +01:00
Benjamin Otte
d9b0685b49
Add gtk_snapshot_push_cross_fade()
...
... and use it.
The function is a bit awkward because it requires 2 calls to
gtk_snapshot_pop(), but once you accept that, it's very convenient to
use, as can be seen by the 2 implementations.
2017-01-13 03:38:36 +01:00
Alexander Larsson
65ad2541d7
Snapshot: Only record names if inspector is recording
...
Otherwise we do a lot of allocations and vprintf calls which are
not used.
2017-01-11 10:22:40 +01:00
Benjamin Otte
4c7ddbf519
cssimage: Fix cross-fade
...
Simgle image cross-fade opacity was computed the wrong way, which caused
weird fade-in/out animations, for example in flat buttons.
I messed this up when porting cross-fades to snapshot().
2017-01-11 02:53:12 +01:00
Benjamin Otte
8ad7c435ca
cssimage: Implement snapshot() for cross-fade
2016-12-20 18:01:11 +01:00
Matthias Clasen
e51fd7cb18
css: Complete the cross-fade implementation
...
We need to actually compute the images. Otherwise,
bad things happen when we try to draw.
https://bugzilla.gnome.org/show_bug.cgi?id=767391
2016-09-06 06:38:50 -04:00
Benjamin Otte
de38435921
cssimagecrossfade: Fix order of images when parsing/printing
...
The syntax is cross-fade(<percentage> <end>, <start>), not the
other way around. That's because the percentage refers to the end image.
2016-02-15 04:41:12 +01:00
Benjamin Otte
a52ecd2be6
css: Add gtk_css_number_value_can_parse()
...
Use it instead of _gtk_css_parser_has_number().
We need that once we introduce calc() support.
2016-02-13 04:49:08 +01:00
Benjamin Otte
0bfbf39306
cssimage: Implement some equal functions
2012-11-01 12:27:31 +01:00
Benjamin Otte
558ffc24c2
cssimage: Make image transition a vfunc
2012-10-02 14:16:36 +02:00
Benjamin Otte
ee6f886434
cssimage: Make cross-fade code safe for non-integer sizes
...
This includes sizes < 1px, which previously caused a SEGV.
2012-09-17 20:39:13 +02:00
Benjamin Otte
eb6ad3562e
cssimage: Implement (most of) current cross-fade syntax
...
The CSS4 spec adapted their cross-fade syntax again. Yay!
(The previous parser was completely broken anyway...)
2012-09-17 20:39:13 +02:00
Benjamin Otte
ea9081ae3b
cssimage: Make cross-fades cross-fade properly
...
We need to use OPERATOR_SOURCE to properly fade out the start image
when the end image contains transparency.
2012-09-14 17:33:02 -04:00
Benjamin Otte
c9f01ffb43
cssimage: No need to pass base file anymore
...
The file is now part of the GtkCssParser
2012-05-11 16:42:12 +02:00
Benjamin Otte
d853a8f2f7
cssimage: Add GtkCssImageCrossFade
...
Supports the cross-fade() css notation the way the old CSS3 specs did.
The main reason for adding it is supporting image transitions though.
2012-04-17 08:59:16 +02:00