Revision: 16694
http://sourceforge.net/p/skim-app/code/16694
Author: hofman
Date: 2026-10-22 14:31:44 +0000 (Thu, 22 Oct 2026)
Log Message:
-----------
rename property, only resize timer when showing the time
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
trunk/SKTimerView.h
trunk/SKTimerView.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2026-10-22 14:24:51 UTC (rev
16693)
+++ trunk/SKMainWindowController_FullScreen.m 2026-10-22 14:31:44 UTC (rev
16694)
@@ -878,7 +878,7 @@
- (void)mouseExited:(NSEvent *)event {
if ([[event trackingArea] isEqual:[presentationNotesAuxiliary
trackingArea]] && [presentationNotesAuxiliary button]) {
- BOOL shouldRemoveTimer = [[presentationNotesAuxiliary timerView]
isActive] == NO;
+ BOOL shouldRemoveTimer = [[presentationNotesAuxiliary timerView]
showsTime] == NO;
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){
[[[presentationNotesAuxiliary button] animator] setAlphaValue:0.0];
if (shouldRemoveTimer)
Modified: trunk/SKTimerView.h
===================================================================
--- trunk/SKTimerView.h 2026-10-22 14:24:51 UTC (rev 16693)
+++ trunk/SKTimerView.h 2026-10-22 14:31:44 UTC (rev 16694)
@@ -47,10 +47,10 @@
NSTimer *timer;
NSDate *startDate;
NSLayoutConstraint *widthConstraint;
- BOOL active;
+ BOOL showsTime;
}
-@property (nonatomic, readonly, getter=isActive) BOOL active;
+@property (nonatomic, readonly) BOOL showsTime;
@end
Modified: trunk/SKTimerView.m
===================================================================
--- trunk/SKTimerView.m 2026-10-22 14:24:51 UTC (rev 16693)
+++ trunk/SKTimerView.m 2026-10-22 14:31:44 UTC (rev 16694)
@@ -46,7 +46,7 @@
@implementation SKTimerView
-@synthesize active;
+@synthesize showsTime;
- (instancetype)init {
self = [self initWithFrame:NSMakeRect(0.0, 0.0, DEFAULT_WIDTH,
DEFAULT_HEIGHT)];
@@ -99,11 +99,11 @@
min = min % 60;
BOOL shouldResize = NO;
if (hour > 0) {
- if (sec < 2 && min == 0 && (hour == 1 || hour == 10))
+ if (showsTime && sec < 2 && min == 0 && (hour == 1 || hour == 10))
shouldResize = [[textField stringValue] length] < (hour == 10 ? 8
: 7);
[textField setStringValue:[NSString
stringWithFormat:@"%lu:%.2lu:%.2lu", hour, min, sec]];
} else {
- if (sec < 2 && min == 10)
+ if (showsTime && sec < 2 && min == 10)
shouldResize = [[textField stringValue] length] < 5;
[textField setStringValue:[NSString stringWithFormat:@"%lu:%.2lu",
min, sec]];
}
@@ -112,7 +112,7 @@
}
- (void)mouseDown:(NSEvent *)event {
- if (active == NO) {
+ if (showsTime == NO) {
if (timer == nil) {
startDate = [NSDate date];
__weak SKTimerView *weakSelf = self;
@@ -162,7 +162,7 @@
]];
[[widthConstraint animator] setConstant:[textField
intrinsicContentSize].width + DEFAULT_OUTSET];
}];
- active = YES;
+ showsTime = YES;
} else {
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){
[[bgView animator] removeFromSuperview];
@@ -173,7 +173,7 @@
]];
[[widthConstraint animator] setConstant:DEFAULT_WIDTH];
}];
- active = NO;
+ showsTime = 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