mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[macos] refactoring
This commit is contained in:
@ -98,7 +98,7 @@
|
||||
NSView * superview = view.superview;
|
||||
|
||||
view.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
|
||||
// leading
|
||||
[superview addConstraint:[NSLayoutConstraint constraintWithItem:view
|
||||
attribute:NSLayoutAttributeLeading
|
||||
@ -116,10 +116,17 @@
|
||||
multiplier:1
|
||||
constant:0]];
|
||||
// width
|
||||
// [superview addConstraint:[NSLayoutConstraint constraintWithItem:superview
|
||||
// attribute:NSLayoutAttributeWidth
|
||||
// relatedBy:NSLayoutRelationEqual
|
||||
// toItem:view attribute:NSLayoutAttributeWidth
|
||||
// multiplier:1
|
||||
// constant:0]];
|
||||
// width
|
||||
[superview addConstraint:[NSLayoutConstraint constraintWithItem:superview
|
||||
attribute:NSLayoutAttributeWidth
|
||||
attribute:NSLayoutAttributeTrailing
|
||||
relatedBy:NSLayoutRelationEqual
|
||||
toItem:view attribute:NSLayoutAttributeWidth
|
||||
toItem:view attribute:NSLayoutAttributeTrailing
|
||||
multiplier:1
|
||||
constant:0]];
|
||||
// height
|
||||
|
||||
@ -283,7 +283,6 @@ static NSUInteger const kASTabViewCloseButtonSize = 12;
|
||||
CGFloat btnCloseOriginLeft = -([self userInterfaceLayoutDirection] == NSUserInterfaceLayoutDirectionRightToLeft ?
|
||||
CGRectGetWidth(rect) - kASTabViewCloseButtonSize / 1.5 : kASTabViewCloseButtonSize * 1.5);
|
||||
|
||||
NSLog(@"tabview btn close origin %f %@", btnCloseOriginLeft, NSStringFromRect(rect));
|
||||
[self.close setFrame:CGRectMake(btnCloseOriginLeft,
|
||||
kASTabViewCloseButtonSize / 1.5,
|
||||
kASTabViewCloseButtonSize,
|
||||
|
||||
Reference in New Issue
Block a user