Files
transmission/macosx/ButtonToolbarItem.mm
Mitch Livingston b99232777e macOS 26: set icons on most menu items (#7787)
* 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
2025-11-09 17:28:28 -05:00

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