mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
* macOS 26: set icons on most menu items This is a first pass, and likely needs some adjustments and updated. This also removes Select None, which does not seem to be in favor in Mac apps anymore. * Explicitly set the image on toolbar items' menu representation * Icons for Info > Files context menu
25 lines
632 B
Plaintext
25 lines
632 B
Plaintext
// This file Copyright © Transmission authors and contributors.
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
// License text can be found in the licenses/ folder.
|
|
|
|
#import "ButtonToolbarItem.h"
|
|
|
|
@implementation ButtonToolbarItem
|
|
|
|
- (void)validate
|
|
{
|
|
self.enabled = [self.target validateToolbarItem:self];
|
|
}
|
|
|
|
- (NSMenuItem*)menuFormRepresentation
|
|
{
|
|
NSMenuItem* menuItem = [[NSMenuItem alloc] initWithTitle:self.label action:self.action keyEquivalent:@""];
|
|
menuItem.image = self.image;
|
|
menuItem.target = self.target;
|
|
menuItem.enabled = [self.target validateToolbarItem:self];
|
|
|
|
return menuItem;
|
|
}
|
|
|
|
@end
|