Do not use NSBackgroundStyleRaised for views in file browser header

It does not appear to have any effect and is probably (semantically) wrong now that buttons are placed on “header” material (on 10.14).
This commit is contained in:
Allan Odgaard
2018-11-15 11:28:54 +07:00
parent 77280a8ebf
commit 414e516ea9

View File

@@ -4,8 +4,7 @@
static NSButton* OakCreateImageButton (NSString* imageName)
{
NSButton* res = [NSButton new];
[[res cell] setBackgroundStyle:NSBackgroundStyleRaised];
NSButton* res = [[NSButton alloc] initWithFrame:NSZeroRect];
[res setButtonType:NSMomentaryChangeButton];
[res setBordered:NO];
[res setImage:[NSImage imageNamed:imageName]];
@@ -16,7 +15,6 @@ static NSButton* OakCreateImageButton (NSString* imageName)
static NSPopUpButton* OakCreateFolderPopUpButton ()
{
NSPopUpButton* res = [[NSPopUpButton alloc] initWithFrame:NSZeroRect pullsDown:YES];
[[res cell] setBackgroundStyle:NSBackgroundStyleRaised];
[res setContentCompressionResistancePriority:NSLayoutPriorityDefaultLow forOrientation:NSLayoutConstraintOrientationHorizontal];
[res setContentHuggingPriority:NSLayoutPriorityFittingSizeCompression forOrientation:NSLayoutConstraintOrientationHorizontal];
[res setContentHuggingPriority:NSLayoutPriorityDefaultLow forOrientation:NSLayoutConstraintOrientationVertical];