Revision: 7334 http://skim-app.svn.sourceforge.net/skim-app/?rev=7334&view=rev Author: hofman Date: 2011-07-08 11:24:35 +0000 (Fri, 08 Jul 2011)
Log Message: ----------- force setting full pref window frame including size, otherwise we only restore the bottom position, but we need the top Modified Paths: -------------- trunk/SKPreferenceController.m Modified: trunk/SKPreferenceController.m =================================================================== --- trunk/SKPreferenceController.m 2011-07-08 10:04:32 UTC (rev 7333) +++ trunk/SKPreferenceController.m 2011-07-08 11:24:35 UTC (rev 7334) @@ -123,10 +123,8 @@ NSView *contentView = [[self window] contentView]; NSView *view = [pane view]; - NSRect frame = [view frame]; - CGFloat dh = NSHeight([contentView frame]) - NSMaxY(frame); - - frame = [[self window] frame]; + CGFloat dh = NSHeight([contentView frame]) - NSMaxY([view frame]); + NSRect frame = [[self window] frame]; frame.origin.y += dh; frame.size.height -= dh; @@ -166,6 +164,8 @@ [window setToolbar:toolbar]; [window setShowsToolbarButton:NO]; + // we want to restore the top of the window, while without the force it restores the bottom position without the size + [[self window] setFrameUsingName:SKPreferenceWindowFrameAutosaveName force:YES]; [self setWindowFrameAutosaveName:SKPreferenceWindowFrameAutosaveName]; SKAutoSizeButtons(resetButtons, NO); @@ -192,9 +192,11 @@ [window setTitle:[currentPane title]]; view = [currentPane view]; + CGFloat dh = NSHeight([[[self window] contentView] frame]) - NSMaxY([view frame]); frame = [[self window] frame]; frame.size.width = width; - frame.size.height -= NSHeight([[[self window] contentView] frame]) - NSMaxY([view frame]); + frame.size.height -= dh; + frame.origin.y += dh; [window setFrame:frame display:NO]; [[[self window] contentView] addSubview:view]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit