mirror of
https://github.com/alexkay/spek.git
synced 2025-05-30 07:09:32 +03:00
osx: Bundle toolbar icons, fixes #21
This commit is contained in:
parent
a53b4df231
commit
12871fb271
BIN
dist/osx/about.png
vendored
Normal file
BIN
dist/osx/about.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
1
dist/osx/bundle.sh
vendored
1
dist/osx/bundle.sh
vendored
@ -17,6 +17,7 @@ mkdir -p Spek.app/Contents/Resources
|
||||
mv ../../src/spek Spek.app/Contents/MacOS/Spek
|
||||
cp Info.plist Spek.app/Contents/
|
||||
cp Spek.icns Spek.app/Contents/Resources/
|
||||
cp *.png Spek.app/Contents/Resources/
|
||||
|
||||
for lang in $LANGUAGES; do
|
||||
mkdir -p Spek.app/Contents/Resources/"$lang".lproj
|
||||
|
BIN
dist/osx/close.png
vendored
Normal file
BIN
dist/osx/close.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 505 B |
BIN
dist/osx/open.png
vendored
Normal file
BIN
dist/osx/open.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
dist/osx/save.png
vendored
Normal file
BIN
dist/osx/save.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
@ -44,6 +44,9 @@ wxBitmap SpekArtProvider::CreateBitmap(
|
||||
#endif
|
||||
#ifdef OS_WIN
|
||||
return wxIcon(wxT("about"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24);
|
||||
#endif
|
||||
#ifdef OS_OSX
|
||||
return wxBitmap(wxT("about"), wxBITMAP_TYPE_PNG_RESOURCE);
|
||||
#endif
|
||||
}
|
||||
if (id == ART_OPEN) {
|
||||
@ -52,6 +55,9 @@ wxBitmap SpekArtProvider::CreateBitmap(
|
||||
#endif
|
||||
#ifdef OS_WIN
|
||||
return wxIcon(wxT("open"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24);
|
||||
#endif
|
||||
#ifdef OS_OSX
|
||||
return wxBitmap(wxT("open"), wxBITMAP_TYPE_PNG_RESOURCE);
|
||||
#endif
|
||||
}
|
||||
if (id == ART_SAVE) {
|
||||
@ -60,6 +66,9 @@ wxBitmap SpekArtProvider::CreateBitmap(
|
||||
#endif
|
||||
#ifdef OS_WIN
|
||||
return wxIcon(wxT("save"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24);
|
||||
#endif
|
||||
#ifdef OS_OSX
|
||||
return wxBitmap(wxT("save"), wxBITMAP_TYPE_PNG_RESOURCE);
|
||||
#endif
|
||||
}
|
||||
if (id == ART_CLOSE) {
|
||||
@ -68,6 +77,9 @@ wxBitmap SpekArtProvider::CreateBitmap(
|
||||
#endif
|
||||
#ifdef OS_WIN
|
||||
return wxIcon(wxT("close"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
|
||||
#endif
|
||||
#ifdef OS_OSX
|
||||
return wxBitmap(wxT("close"), wxBITMAP_TYPE_PNG_RESOURCE);
|
||||
#endif
|
||||
}
|
||||
return wxNullBitmap;
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
#include <wx/string.h>
|
||||
|
||||
#define ART_HAS_ICON_BUNDLES wxCHECK_VERSION(2, 9, 0)
|
||||
|
||||
#define ART_SPEK wxT("art-spek")
|
||||
#define ART_OPEN wxT("art-open")
|
||||
#define ART_SAVE wxT("art-save")
|
||||
|
@ -76,8 +76,10 @@ SpekWindow::SpekWindow(const wxString& path) :
|
||||
this->description = _("Spek - Acoustic Spectrum Analyser");
|
||||
SetTitle(this->description);
|
||||
|
||||
#if ART_HAS_ICON_BUNDLES
|
||||
#if wxCHECK_VERSION(2, 9, 0)
|
||||
#ifndef OS_OSX
|
||||
SetIcons(wxArtProvider::GetIconBundle(ART_SPEK, wxART_FRAME_ICON));
|
||||
#endif
|
||||
#else
|
||||
SetIcon(wxArtProvider::GetIcon(ART_SPEK, wxART_FRAME_ICON, wxSize(48, 48)));
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user