win: Custom toolbar icons, refs #21

This commit is contained in:
Alexander Kojevnikov 2012-09-04 22:22:50 -07:00
parent ead812e6da
commit 76d0109dc8
6 changed files with 17 additions and 4 deletions

BIN
dist/win/about.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

1
dist/win/bundle.sh vendored
View File

@ -19,6 +19,7 @@ cd $(dirname $0)/../..
rm -fr dist/win/build && mkdir dist/win/build
# Compile the resource file
rm -f dist/win/spek.res
"$WINDRES" dist/win/spek.rc -O coff -o dist/win/spek.res
mkdir -p src/dist/win && cp dist/win/spek.res src/dist/win/

BIN
dist/win/open.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
dist/win/save.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

3
dist/win/spek.rc vendored
View File

@ -1 +1,4 @@
aaaa ICON "spek.ico"
about ICON "about.ico"
open ICON "open.ico"
save ICON "save.ico"

View File

@ -36,21 +36,30 @@ wxBitmap SpekArtProvider::CreateBitmap(
if (id == ART_SPEK) {
#ifdef OS_UNIX
return wxArtProvider::GetBitmap(wxT("spek"), client, size);
#endif
}
if (id == ART_ABOUT) {
#ifdef OS_UNIX
return wxArtProvider::GetBitmap(wxT("gtk-about"), client, size);
#endif
#ifdef OS_WIN
return wxIcon(wxT("about"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24);
#endif
}
if (id == ART_OPEN) {
#ifdef OS_UNIX
return wxArtProvider::GetBitmap(wxT("gtk-open"), client, size);
#endif
#ifdef OS_WIN
return wxIcon(wxT("open"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24);
#endif
}
if (id == ART_SAVE) {
#ifdef OS_UNIX
return wxArtProvider::GetBitmap(wxT("gtk-save"), client, size);
#endif
}
if (id == ART_ABOUT) {
#ifdef OS_UNIX
return wxArtProvider::GetBitmap(wxT("gtk-about"), client, size);
#ifdef OS_WIN
return wxIcon(wxT("save"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24);
#endif
}
return wxNullBitmap;