mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
dialogs: Reduce About Dialog animations if requested
The About Dialog shows authors names using motion effects. Since this is done with Cairo, it does not respect the "gtk-enable-animations" setting or OSX's "Reduced Motion" option. This patch retrieves the "gtk-enable-animations" value. If it is set to false, then the simple fade-in effect is used for author names in place of the motion effects.
This commit is contained in:
parent
57012174fb
commit
e13cc63525
1 changed files with 12 additions and 4 deletions
|
@ -683,8 +683,15 @@ decorate_text (GimpAboutDialog *dialog,
|
|||
static gboolean
|
||||
about_dialog_timer (gpointer data)
|
||||
{
|
||||
GimpAboutDialog *dialog = data;
|
||||
gint timeout = 0;
|
||||
GimpAboutDialog *dialog = data;
|
||||
gint timeout = 0;
|
||||
gboolean use_animation = TRUE;
|
||||
|
||||
/* Use a simple fade-in effect rather than more dynamics motions
|
||||
* if the user has requested reduced animations */
|
||||
g_object_get (gtk_settings_get_default (),
|
||||
"gtk-enable-animations", &use_animation,
|
||||
NULL);
|
||||
|
||||
if (dialog->animstep == 0)
|
||||
{
|
||||
|
@ -727,7 +734,8 @@ about_dialog_timer (gpointer data)
|
|||
|
||||
if (dialog->animstep < 16)
|
||||
{
|
||||
decorate_text (dialog, 2, ((gfloat) dialog->animstep) / 15.0);
|
||||
decorate_text (dialog, use_animation ? 2 : 0,
|
||||
((gfloat) dialog->animstep) / 15.0);
|
||||
}
|
||||
else if (dialog->animstep == 16)
|
||||
{
|
||||
|
@ -739,7 +747,7 @@ about_dialog_timer (gpointer data)
|
|||
}
|
||||
else if (dialog->animstep < 33)
|
||||
{
|
||||
decorate_text (dialog, 1,
|
||||
decorate_text (dialog, use_animation ? 1 : 0,
|
||||
1.0 - ((gfloat) (dialog->animstep - 17)) / 15.0);
|
||||
}
|
||||
else if (dialog->animstep == 33)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue