mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
only set the splitter position the first time through, not ever time the
view is displayed
This commit is contained in:
parent
a41a489fe4
commit
f4bb39a840
@ -70,6 +70,7 @@
|
||||
IBOutlet HistoryDataSource* mHistorySource; //can swap to this for history data
|
||||
|
||||
BOOL mSetupComplete; // have we been fully initialized?
|
||||
BOOL mSplittersRestored; // splitters can only be positioned after we resize to fit the window
|
||||
NSMutableDictionary *mExpandedStatus;
|
||||
NSString* mCachedHref;
|
||||
BookmarkFolder *mActiveRootCollection;
|
||||
|
@ -88,6 +88,7 @@ const long kMinSearchPaneHeight = 80;
|
||||
mExpandedStatus = nil;
|
||||
mSearchResultArray = nil;
|
||||
mOpenActionFlag = 0;
|
||||
mSplittersRestored = NO;
|
||||
|
||||
// wait for |-completeSetup| to be called to lazily complete our setup
|
||||
mSetupComplete = NO;
|
||||
@ -643,11 +644,14 @@ const long kMinSearchPaneHeight = 80;
|
||||
// manager view resized correctly. If we did it earlier, it would resize again
|
||||
// to stretch proportionally to the size of the browser window, destroying
|
||||
// the width we just set.
|
||||
const float kDefaultSplitWidth = kMinContainerSplitWidth;
|
||||
float savedWidth = [[NSUserDefaults standardUserDefaults] floatForKey:USER_DEFAULTS_CONTAINER_SPLITTER_WIDTH];
|
||||
if (savedWidth < kDefaultSplitWidth)
|
||||
savedWidth = kDefaultSplitWidth;
|
||||
[mContainersSplit setLeftWidth:savedWidth];
|
||||
if (!mSplittersRestored) {
|
||||
const float kDefaultSplitWidth = kMinContainerSplitWidth;
|
||||
float savedWidth = [[NSUserDefaults standardUserDefaults] floatForKey:USER_DEFAULTS_CONTAINER_SPLITTER_WIDTH];
|
||||
if (savedWidth < kDefaultSplitWidth)
|
||||
savedWidth = kDefaultSplitWidth;
|
||||
[mContainersSplit setLeftWidth:savedWidth];
|
||||
mSplittersRestored = YES; // needed first time only
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setCanEditSelectedContainerContents:(BOOL)inCanEdit
|
||||
|
Loading…
Reference in New Issue
Block a user