mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 18:42:24 +00:00
Changed layout to accommodate locking
Fixed Autolayout hickups Added lock screen Removed unused views Some refactorings
This commit is contained in:
@@ -76,22 +76,6 @@
|
||||
selector:@selector(_didChangeSelectedGroup:)
|
||||
name:MPOutlineViewDidChangeGroupSelection
|
||||
object:nil];
|
||||
|
||||
self.showConstraint = [NSLayoutConstraint constraintWithItem:[self view] attribute:NSLayoutAttributeWidth
|
||||
relatedBy:NSLayoutRelationGreaterThanOrEqual
|
||||
toItem:nil
|
||||
attribute:NSLayoutAttributeNotAnAttribute
|
||||
multiplier:1
|
||||
constant:200];
|
||||
self.hideConstraint = [NSLayoutConstraint constraintWithItem:[self view] attribute:NSLayoutAttributeWidth
|
||||
relatedBy:NSLayoutRelationEqual
|
||||
toItem:nil
|
||||
attribute:NSLayoutAttributeNotAnAttribute
|
||||
multiplier:1
|
||||
constant:0];
|
||||
|
||||
[self.view addConstraint:self.showConstraint];
|
||||
|
||||
[self _clearContent];
|
||||
}
|
||||
|
||||
@@ -99,14 +83,6 @@
|
||||
return [[self view] frame].size.width > 0;
|
||||
}
|
||||
|
||||
- (void)toggleVisible {
|
||||
NSLayoutConstraint *add = [self isVisible] ? self.hideConstraint : self.showConstraint;
|
||||
NSLayoutConstraint *remove = [self isVisible] ? self.showConstraint : self.hideConstraint;
|
||||
[[self view] removeConstraint:remove];
|
||||
[[self view] addConstraint:add];
|
||||
[[[self view] window] layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)_updateContent {
|
||||
if(self.showsEntry && self.selectedEntry) {
|
||||
[self _showEntry];
|
||||
|
||||
Reference in New Issue
Block a user