Public bug reported:

I'm doing some code with Adw.Animation, but it doesn't work in Stonking
(although in Resolute it does).

This simple example shows the problem: it just jumps to the last
interpolation point. But the same code in Resolute goes through all the
intermediate values.


```
#include <gtk/gtk.h>
#include <adwaita.h>

static void
set_opacity (double opacity, gpointer user_data)
{
    g_print("Valor: %f\n", opacity);
}

void activate (GApplication *app, gpointer user_data)
{
    GtkWidget *window;
    GtkWidget *label;

    window = gtk_application_window_new (GTK_APPLICATION (app));
    gtk_window_set_title (GTK_WINDOW (window), "Test Animation");
    gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);

    label = gtk_label_new ("Hello, World!");
    gtk_window_set_child (GTK_WINDOW (window), label);
    gtk_window_present (GTK_WINDOW (window));

    AdwAnimation *animation;
    AdwAnimationTarget *target;

    target = adw_callback_animation_target_new (set_opacity, label, NULL);
    animation = adw_timed_animation_new (label, 1.0, 0.3, 900, target);
    adw_animation_play (animation);
}

int main(int argc, char *argv[])
{

    g_autoptr(GtkApplication) app = NULL;
    app = gtk_application_new ("org.gnome.test-animation", 
G_APPLICATION_DEFAULT_FLAGS);
    g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
    g_application_run (G_APPLICATION (app), argc, argv);
    return 0;
}
```

And the makefile:

```
test: test.c
    $(CC) -o test test.c `pkg-config --cflags --libs gtk4 libadwaita-1` -lm
```

In Resolute, it shows in the console the interpolated values. In
Stonking it just shows the last value, exactly as if the animations were
disabled in Accessibility.

Tested with libadwaita 1.10~alpha.1-0ubuntu3

** Affects: libadwaita-1 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2162566

Title:
  Animations don't work in Stonking

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libadwaita-1/+bug/2162566/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to