Revision: 14133
http://sourceforge.net/p/skim-app/code/14133
Author: hofman
Date: 2024-03-24 10:23:47 +0000 (Sun, 24 Mar 2024)
Log Message:
-----------
Add color filters to miniaturize window when using thumbnail
Modified Paths:
--------------
trunk/SKSnapshotWindowController.m
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2024-03-24 00:05:21 UTC (rev 14132)
+++ trunk/SKSnapshotWindowController.m 2024-03-24 10:23:47 UTC (rev 14133)
@@ -64,6 +64,7 @@
#import "PDFDocument_SKExtensions.h"
#import "NSString_SKExtensions.h"
#import "NSScroller_SKExtensions.h"
+#import "NSGraphics_SKExtensions.h"
#define SMALL_DELAY 0.1
#define RESIZE_TIME_FACTOR 1.0
@@ -583,11 +584,14 @@
}
- (void)miniaturizeWindowFromRect:(NSRect)startRect toRect:(NSRect)endRect {
+ BOOL needsFilters = NO;
if (windowImage == nil) {
- if ([self hasWindow])
+ if ([self hasWindow]) {
windowImage = [(SKSnapshotWindow *)[self window] windowImage];
- else
+ } else {
+ needsFilters = YES;
windowImage = [self thumbnailWithSize:-1.0];
+ }
}
SKAnimatedBorderlessWindow *miniaturizeWindow =
[[SKAnimatedBorderlessWindow alloc] initWithContentRect:startRect];
@@ -594,7 +598,9 @@
[miniaturizeWindow setLevel:NSFloatingWindowLevel];
[miniaturizeWindow setHasShadow:YES];
[miniaturizeWindow setBackgroundImage:windowImage];
-
+ if (needsFilters)
+ [[miniaturizeWindow contentView]
setContentFilters:SKColorEffectFilters()];
+
[miniaturizeWindow orderFront:nil];
animating = YES;
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