commit 76d0109dc847bdcc3d808783903c9b0cab2d945e
parent ead812e6dad741df08467e5d9691ed0180885923
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date: Tue, 4 Sep 2012 22:22:50 -0700
win: Custom toolbar icons, refs #21
Diffstat:
6 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/dist/win/about.ico b/dist/win/about.ico
Binary files differ.
diff --git a/dist/win/bundle.sh b/dist/win/bundle.sh
@@ -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/
diff --git a/dist/win/open.ico b/dist/win/open.ico
Binary files differ.
diff --git a/dist/win/save.ico b/dist/win/save.ico
Binary files differ.
diff --git a/dist/win/spek.rc b/dist/win/spek.rc
@@ -1 +1,4 @@
aaaa ICON "spek.ico"
+about ICON "about.ico"
+open ICON "open.ico"
+save ICON "save.ico"
diff --git a/src/spek-artwork.cc b/src/spek-artwork.cc
@@ -38,19 +38,28 @@ wxBitmap SpekArtProvider::CreateBitmap(
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;