Added MPToolbarButton to handle small control size in Toolbar

EntryEditView now gets displayed (without any functionality)
This commit is contained in:
michael starke
2013-02-26 20:57:25 +01:00
parent 2e8d35a432
commit 361b405825
22 changed files with 1274 additions and 436 deletions

36
MacPass/MPToolbarButton.m Normal file
View File

@@ -0,0 +1,36 @@
//
// MPButton.m
// MacPass
//
// Created by michael starke on 26.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPToolbarButton.h"
@implementation MPToolbarButton
- (void)setControlSize:(NSControlSize)controlSize {
[[self cell] setControlSize:controlSize];
switch (controlSize) {
case NSRegularControlSize:
[[self image] setSize:NSMakeSize(16, 16)];
break;
case NSSmallControlSize:
[[self image] setSize:NSMakeSize(14, 14)];
break;
case NSMiniControlSize:
[[self image] setSize:NSMakeSize(8, 8)];
default:
break;
}
}
- (NSControlSize)controlSize {
return [[self cell] controlSize];
}
@end