Revision: 14087
          http://sourceforge.net/p/skim-app/code/14087
Author:   hofman
Date:     2024-03-02 16:41:11 +0000 (Sat, 02 Mar 2024)
Log Message:
-----------
simplify ivar name

Modified Paths:
--------------
    trunk/SKMainWindowController.h
    trunk/SKMainWindowController.m
    trunk/SKMainWindowController_UI.m

Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h      2024-03-02 15:58:40 UTC (rev 14086)
+++ trunk/SKMainWindowController.h      2024-03-02 16:41:11 UTC (rev 14087)
@@ -104,7 +104,7 @@
     SKFieldEditor                       *fieldEditor;
     
     NSArray<SKThumbnail *>              *thumbnails;
-    CGFloat                             roundedThumbnailSize;
+    CGFloat                             thumbnailSize;
     
     NSMutableArray<PDFSelection *>      *searchResults;
     NSInteger                           searchResultIndex;
@@ -121,7 +121,7 @@
     NSMutableArray<SKSnapshotWindowController *> *snapshots;
     NSMutableArray<SKSnapshotWindowController *> *dirtySnapshots;
     NSTimer                             *snapshotTimer;
-    CGFloat                             roundedSnapshotThumbnailSize;
+    CGFloat                             snapshotThumbnailSize;
     
     NSArray<NSString *>                 *tags;
     double                              rating;

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2024-03-02 15:58:40 UTC (rev 14086)
+++ trunk/SKMainWindowController.m      2024-03-02 16:41:11 UTC (rev 14087)
@@ -1513,7 +1513,7 @@
             break;
         }
     }
-    size = [SKThumbnailView sizeForImageSize:NSMakeSize(ceil(width * 
roundedThumbnailSize), ceil(height * roundedThumbnailSize))];
+    size = [SKThumbnailView sizeForImageSize:NSMakeSize(ceil(width * 
thumbnailSize), ceil(height * thumbnailSize))];
     NSCollectionViewFlowLayout *layout = [overviewView collectionViewLayout];
     if (NSEqualSizes(size, [layout itemSize]) == NO) {
         [layout setItemSize:size];
@@ -2894,13 +2894,13 @@
 }
 
 - (void)resetThumbnailSizeIfNeeded {
-    roundedThumbnailSize = round([[NSUserDefaults standardUserDefaults] 
floatForKey:SKThumbnailSizeKey]);
+    thumbnailSize = round([[NSUserDefaults standardUserDefaults] 
floatForKey:SKThumbnailSizeKey]);
 
-    CGFloat defaultSize = roundedThumbnailSize;
-    CGFloat thumbnailSize = (defaultSize < TINY_SIZE + FUDGE_SIZE) ? TINY_SIZE 
: (defaultSize < SMALL_SIZE + FUDGE_SIZE) ? SMALL_SIZE : (defaultSize < 
LARGE_SIZE + FUDGE_SIZE) ? LARGE_SIZE : HUGE_SIZE;
+    CGFloat defaultSize = thumbnailSize;
+    CGFloat cacheSize = (defaultSize < TINY_SIZE + FUDGE_SIZE) ? TINY_SIZE : 
(defaultSize < SMALL_SIZE + FUDGE_SIZE) ? SMALL_SIZE : (defaultSize < 
LARGE_SIZE + FUDGE_SIZE) ? LARGE_SIZE : HUGE_SIZE;
     
-    if (fabs(thumbnailSize - thumbnailCacheSize) > FUDGE_SIZE) {
-        thumbnailCacheSize = thumbnailSize;
+    if (fabs(cacheSize - thumbnailCacheSize) > FUDGE_SIZE) {
+        thumbnailCacheSize = cacheSize;
         
         if ([[self thumbnails] count])
             [self allThumbnailsNeedUpdate];
@@ -2974,8 +2974,8 @@
 #pragma mark Snapshots
 
 - (void)resetSnapshotSizeIfNeeded {
-    roundedSnapshotThumbnailSize = round([[NSUserDefaults 
standardUserDefaults] floatForKey:SKSnapshotThumbnailSizeKey]);
-    CGFloat defaultSize = roundedSnapshotThumbnailSize;
+    snapshotThumbnailSize = round([[NSUserDefaults standardUserDefaults] 
floatForKey:SKSnapshotThumbnailSizeKey]);
+    CGFloat defaultSize = snapshotThumbnailSize;
     CGFloat snapshotSize = (defaultSize < TINY_SIZE + FUDGE_SIZE) ? TINY_SIZE 
: (defaultSize < SMALL_SIZE + FUDGE_SIZE) ? SMALL_SIZE : (defaultSize < 
LARGE_SIZE + FUDGE_SIZE) ? LARGE_SIZE : HUGE_SIZE;
     
     if (fabs(snapshotSize - snapshotCacheSize) > FUDGE_SIZE) {

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2024-03-02 15:58:40 UTC (rev 14086)
+++ trunk/SKMainWindowController_UI.m   2024-03-02 16:41:11 UTC (rev 14087)
@@ -519,10 +519,10 @@
     CGFloat thumbHeight = 0.0, rowHeight = [tv rowHeight];
     if ([tv isEqual:leftSideController.thumbnailTableView]) {
         thumbSize = [[thumbnails objectAtIndex:row] size];
-        thumbHeight = roundedThumbnailSize;
+        thumbHeight = thumbnailSize;
     } else if ([tv isEqual:rightSideController.snapshotTableView]) {
         thumbSize = [[(SKSnapshotWindowController 
*)[[rightSideController.snapshotArrayController arrangedObjects] 
objectAtIndex:row] thumbnail] size];
-        thumbHeight = roundedSnapshotThumbnailSize;
+        thumbHeight = snapshotThumbnailSize;
     } else {
         return rowHeight;
     }

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