|
@@ -709,7 +709,12 @@ NSString *KMToolbarDividerItemIdentifier = @"KMToolbarDividerItemIdentifier";
|
|
|
|
|
|
- (void)updateMainView
|
|
|
{
|
|
|
+ NSView *centerView = [[NSView alloc] init];
|
|
|
+ [self addSubview:centerView];
|
|
|
+
|
|
|
NSView *leftView = [[NSView alloc] init];
|
|
|
+ leftView.wantsLayer = YES;
|
|
|
+ leftView.layer.backgroundColor = [NSColor colorWithRed:247/255.f green:248/255.f blue:250/255.f alpha:1.f].CGColor;
|
|
|
[self addSubview:leftView];
|
|
|
[leftView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.equalTo(self.mas_left).offset(0);
|
|
@@ -772,6 +777,8 @@ NSString *KMToolbarDividerItemIdentifier = @"KMToolbarDividerItemIdentifier";
|
|
|
|
|
|
NSView *rightView = [[NSView alloc] init];
|
|
|
[self addSubview:rightView];
|
|
|
+ rightView.wantsLayer = YES;
|
|
|
+ rightView.layer.backgroundColor = [NSColor colorWithRed:247/255.f green:248/255.f blue:250/255.f alpha:1.f].CGColor;
|
|
|
[rightView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.right.equalTo(self.mas_right).offset(0);
|
|
|
make.top.equalTo(self.mas_top).offset(0);
|
|
@@ -831,14 +838,16 @@ NSString *KMToolbarDividerItemIdentifier = @"KMToolbarDividerItemIdentifier";
|
|
|
rightlastItem = item;
|
|
|
}
|
|
|
|
|
|
- NSView *centerView = [[NSView alloc] init];
|
|
|
- [self addSubview:centerView];
|
|
|
+// NSView *centerView = [[NSView alloc] init];
|
|
|
+// [self addSubview:centerView];
|
|
|
|
|
|
[centerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.right.equalTo(rightView.mas_left).offset(0);
|
|
|
+// make.right.equalTo(rightView.mas_left).offset(0);
|
|
|
+ make.right.mas_equalTo(0);
|
|
|
make.top.equalTo(self.mas_top).offset(0);
|
|
|
make.bottom.equalTo(self.mas_bottom).offset(0);
|
|
|
- make.left.equalTo(leftView.mas_right).offset(0);
|
|
|
+// make.left.equalTo(leftView.mas_right).offset(0);
|
|
|
+ make.left.mas_equalTo(0);
|
|
|
}];
|
|
|
|
|
|
if(!self.contentView.superview) {
|