dialogs: Respect MacOS Reduced Motion option
e13cc635 uses gtk-enable-animation to determine whether
the more dynamic motion animation should be used for the
About Dialog credits. However, gtk-enable-animation does
not take into account the MacOS preferences.
This patch adds a check for this value using NSWorkspace's
accessibilityDisplayShouldReduceMotion boolean. Since the
value is TRUE on MacOS if the user wants animations turned
off, the boolean is inverted.
This commit is contained in:
parent
a2bd501cee
commit
d25d877899
1 changed files with 12 additions and 0 deletions
|
|
@ -42,6 +42,10 @@
|
|||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* The first authors are the creators and maintainers, don't shuffle
|
||||
* them
|
||||
|
|
@ -137,6 +141,14 @@ about_dialog_create (Gimp *gimp,
|
|||
"gtk-enable-animations", &dialog.use_animation,
|
||||
NULL);
|
||||
|
||||
/* gtk-enable-animation does not currently respect MacOS's Reduced Motion
|
||||
* setting. This check can be removed once that support is added in GTK.
|
||||
*/
|
||||
#ifdef PLATFORM_OSX
|
||||
dialog.use_animation =
|
||||
! ([[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion]);
|
||||
#endif
|
||||
|
||||
pixbuf = about_dialog_load_logo ();
|
||||
|
||||
copyright = g_strdup_printf (GIMP_COPYRIGHT, GIMP_GIT_LAST_COMMIT_YEAR);
|
||||
|
|
|
|||
Loading…
Reference in a new issue