Skip to content

Commit 63918d6

Browse files
committed
Use NSApplication.applicationIconImage for app icon
In GetPoeditAppIcon(), use the macOS native API for obtaining application icon instead of relying on knowing what the asset's name is. Unlike the old code, this works with macOS 26's new icon format.
1 parent 76cc677 commit 63918d6

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Poedit.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@
463463
B26D064E182506E40069C378 /* languagectrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = languagectrl.h; sourceTree = "<group>"; };
464464
B26D0653182697200069C378 /* welcomescreen.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = welcomescreen.cpp; sourceTree = "<group>"; };
465465
B26D0654182697200069C378 /* welcomescreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = welcomescreen.h; sourceTree = "<group>"; };
466-
B26E2C8125A244FE008D6DF1 /* icons.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = icons.cpp; sourceTree = "<group>"; };
466+
B26E2C8125A244FE008D6DF1 /* icons.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = icons.cpp; sourceTree = "<group>"; };
467467
B26E2C8225A244FF008D6DF1 /* icons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = icons.h; sourceTree = "<group>"; };
468468
B26E2C8425A24541008D6DF1 /* menus.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = menus.cpp; sourceTree = "<group>"; };
469469
B26E2C8525A24541008D6DF1 /* menus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = menus.h; sourceTree = "<group>"; };

src/icons.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ wxBitmap GetPoeditAppIcon([[maybe_unused]]int pointSize)
291291
appicon.SetScaleFactor(scale);
292292
return appicon;
293293
}
294+
#elif defined(__WXOSX__)
295+
return wxBitmap(NSApplication.sharedApplication.applicationIconImage);
294296
#elif defined(__WXGTK__)
295297
return wxArtProvider::GetIcon("net.poedit.Poedit", wxART_FRAME_ICON, wxSize(pointSize, pointSize));
296298
#else

0 commit comments

Comments
 (0)