Revision: 14540
http://sourceforge.net/p/skim-app/code/14540
Author: hofman
Date: 2024-10-10 16:07:17 +0000 (Thu, 10 Oct 2024)
Log Message:
-----------
reuse variable
Modified Paths:
--------------
trunk/SKPresentationOptionsSheetController.m
Modified: trunk/SKPresentationOptionsSheetController.m
===================================================================
--- trunk/SKPresentationOptionsSheetController.m 2024-10-10 15:52:40 UTC
(rev 14539)
+++ trunk/SKPresentationOptionsSheetController.m 2024-10-10 16:07:17 UTC
(rev 14540)
@@ -170,6 +170,8 @@
}
- (void)showHideTableView {
+ NSScrollView *scrollView = [tableView enclosingScrollView];
+
if (separate && [tableView tag] == 0) {
// determine the table width by getting the largest page label
NSTableColumn *tableColumn = [tableView
tableColumnWithIdentifier:PAGE_COLUMNID];
@@ -188,7 +190,6 @@
[tableColumn setMaxWidth:labelWidth];
[tableColumn setWidth:labelWidth];
- NSScrollView *scrollView = [tableView enclosingScrollView];
CGFloat width = [[[tableView tableColumns]
valueForKeyPath:@"@sum.width"] doubleValue] + NSWidth([scrollView frame]) -
[scrollView contentSize].width + 3.0 * [tableView intercellSpacing].width;
[tableWidthConstraint setConstant:width];
@@ -203,7 +204,7 @@
if (isSheet && [NSView shouldShowSlideAnimation]) {
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){
[[boxLeadingConstraint animator] setConstant:width];
- [[[tableView enclosingScrollView] animator] setHidden:separate
== NO];
+ [[scrollView animator] setHidden:separate == NO];
}
completionHandler:^{
if (isSheet) {
@@ -213,7 +214,7 @@
}];
} else {
[boxLeadingConstraint setConstant:width];
- [[tableView enclosingScrollView] setHidden:separate == NO];
+ [scrollView setHidden:separate == NO];
if (isSheet) {
NSRect frame = [window frame];
[window setFrameOrigin:NSMakePoint(NSMidX([[controller window]
frame]) - 0.5 * NSWidth(frame), NSMinY(frame))];
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