Revision: 13573
          http://sourceforge.net/p/skim-app/code/13573
Author:   hofman
Date:     2023-08-13 09:56:33 +0000 (Sun, 13 Aug 2023)
Log Message:
-----------
don't change size of hud window when moving

Modified Paths:
--------------
    trunk/SKNavigationWindow.h
    trunk/SKNavigationWindow.m

Modified: trunk/SKNavigationWindow.h
===================================================================
--- trunk/SKNavigationWindow.h  2023-08-13 09:20:46 UTC (rev 13572)
+++ trunk/SKNavigationWindow.h  2023-08-13 09:56:33 UTC (rev 13573)
@@ -44,6 +44,7 @@
 @interface SKHUDWindow : SKAnimatedBorderlessWindow
 - (id)initWithPDFView:(SKPDFView *)pdfView;
 - (void)showForWindow:(NSWindow *)window;
+- (void)handleParentWindowDidResizeNotification:(NSNotification *)notification;
 @end
     
 
@@ -56,7 +57,6 @@
 }
 - (void)handleScaleChangedNotification:(NSNotification *)notification;
 - (void)handlePageChangedNotification:(NSNotification *)notification;
-- (void)handleParentWindowDidResizeNotification:(NSNotification *)notification;
 @end
 
 

Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m  2023-08-13 09:20:46 UTC (rev 13572)
+++ trunk/SKNavigationWindow.m  2023-08-13 09:56:33 UTC (rev 13573)
@@ -121,6 +121,14 @@
     [super remove];
 }
 
+- (void)handleParentWindowDidResizeNotification:(NSNotification *)notification 
{
+    NSWindow *window = [self parentWindow];
+    NSRect frame = [window frame];
+    frame.origin = NSMakePoint(NSMidX(frame) - 0.5 * NSWidth([self frame]), 
NSMinY(frame) + WINDOW_OFFSET);
+    frame.size = [self frame].size;
+    [self setFrame:frame display:YES];
+}
+
 - (BOOL)isAccessibilityElement {
     return YES;
 }
@@ -240,14 +248,6 @@
     [nextButton setEnabled:[[notification object] canGoToNextPage]];
 }
 
-- (void)handleParentWindowDidResizeNotification:(NSNotification *)notification 
{
-    NSWindow *window = [self parentWindow];
-    NSRect frame = [window frame];
-    CGFloat width = NSWidth([self frame]);
-    frame = NSMakeRect(NSMidX(frame) - 0.5 * width, NSMinY(frame) + 
WINDOW_OFFSET, width, BUTTON_HEIGHT + 2 * BUTTON_MARGIN);
-    [self setFrame:frame display:YES];
-}
-
 @end
 
 #pragma mark -

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