mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
fix build macos
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
@interface MacOSStatusIconDelegate : NSObject
|
||||
@property(assign) NSStatusItem* statusItem;
|
||||
@property(assign) NSView* statusIndicator;
|
||||
@property(retain) NSMenu* nativeMenu;
|
||||
@property(retain) NSMutableArray* menuActionTargets;
|
||||
|
||||
- (void)setIcon:(NSData*)imageData;
|
||||
- (void)setIndicator;
|
||||
@@ -204,6 +206,17 @@ void MacOSStatusIcon::setIcon(const QString& iconPath) {
|
||||
[m_statusBarIcon setIcon:imageResource.uncompressedData().toNSData()];
|
||||
}
|
||||
|
||||
void MacOSStatusIcon::setIconFromData(const QByteArray& imageData) {
|
||||
logger.debug() << "Set icon from rendered data";
|
||||
|
||||
if (imageData.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSData* data = [NSData dataWithBytes:imageData.constData() length:imageData.size()];
|
||||
[m_statusBarIcon setIcon:data];
|
||||
}
|
||||
|
||||
void MacOSStatusIcon::setIndicatorColor(const QColor& indicatorColor) {
|
||||
logger.debug() << "Set indicator color";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user