Revision: 13361
          http://sourceforge.net/p/skim-app/code/13361
Author:   hofman
Date:     2023-03-15 00:11:47 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
don't animate presentation options sheet with reduced motion

Modified Paths:
--------------
    trunk/SKPresentationOptionsSheetController.m

Modified: trunk/SKPresentationOptionsSheetController.m
===================================================================
--- trunk/SKPresentationOptionsSheetController.m        2023-03-14 22:48:42 UTC 
(rev 13360)
+++ trunk/SKPresentationOptionsSheetController.m        2023-03-15 00:11:47 UTC 
(rev 13361)
@@ -306,7 +306,7 @@
             [self makeTransitions];
             width += [tableWidthConstraint constant] + TABLE_OFFSET;
         }
-        if (isVisible) {
+        if (isVisible && [NSView shouldShowSlideAnimation]) {
             [NSAnimationContext runAnimationGroup:^(NSAnimationContext 
*context){
                     [[boxLeadingConstraint animator] setConstant:width];
                     [[scrollView animator] setHidden:hidden];
@@ -318,6 +318,10 @@
         } else {
             [boxLeadingConstraint setConstant:width];
             [scrollView setHidden:hidden];
+            if (isVisible) {
+                NSRect frame = [window frame];
+                [window setFrameOrigin:NSMakePoint(NSMidX([[controller window] 
frame]) - 0.5 * NSWidth(frame), NSMinY(frame))];
+            }
         }
         [[[self undoManager] prepareWithInvocationTarget:self] 
setSeparate:separate == NO];
     }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to