aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-09-29 21:59:30 +0200
committerTeddy Wing2023-09-29 21:59:30 +0200
commit69ddab61e63fa7387af0abfa6567176200690fe6 (patch)
treeca8c9acccdfa4a7da0760c2b270b9d3db8ec8c82
parent67b864b6e13ad7e4746b1d4f5b5c0fa6607689e4 (diff)
downloadBase-Windowed-Application-69ddab61e63fa7387af0abfa6567176200690fe6.tar.bz2
Document: Clean up cascade_offset code
Remove the old test code now that this is working.
-rw-r--r--src/Document.m17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/Document.m b/src/Document.m
index ae0696f..57eefc8 100644
--- a/src/Document.m
+++ b/src/Document.m
@@ -8,16 +8,6 @@ static NSPoint cascade_offset;
{
self = [super init];
if (self) {
- NSLog(@"Checking cascade_offset");
- if (NSEqualPoints(cascade_offset, NSZeroPoint)) {
- NSLog(@"Setting cascade_offset");
- cascade_offset = NSMakePoint(100, 100);
- NSLog(@"Has set cascade_offset x:%f y:%f", cascade_offset.x, cascade_offset.y);
- }
- else {
- NSLog(@"init has cascade_offset x:%f y:%f", cascade_offset.x, cascade_offset.y);
- }
-
_label = [[NSTextField alloc]
initWithFrame:NSMakeRect(0, 0, 180, 20)];
[_label setStringValue:@"Your document contents here"];
@@ -74,13 +64,8 @@ static NSPoint cascade_offset;
| NSViewMinYMargin
| NSViewMaxYMargin];
- // *cascade_offset = [window cascadeTopLeftFromPoint:*cascade_offset];
- // NSPoint o = [window cascadeTopLeftFromPoint:*cascade_offset];
- // cascade_offset = &o;
+ // Store the next window origin to shift a new document window's origin.
cascade_offset = [window cascadeTopLeftFromPoint:cascade_offset];
- NSLog(@"after setting cascade_offset x:%f y:%f", cascade_offset.x, cascade_offset.y);
-
- // cascade_offset = [window frame].origin;
NSWindowController *window_controller = [[NSWindowController alloc]
initWithWindow:window];