win: Bundle the close icon, refs #21

This commit is contained in:
Alexander Kojevnikov 2012-09-04 22:53:00 -07:00
parent 76d0109dc8
commit e63c3db43d
4 changed files with 10 additions and 1 deletions

BIN
dist/win/close.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

1
dist/win/spek.rc vendored
View File

@ -2,3 +2,4 @@ aaaa ICON "spek.ico"
about ICON "about.ico"
open ICON "open.ico"
save ICON "save.ico"
close ICON "close.ico"

View File

@ -60,6 +60,14 @@ wxBitmap SpekArtProvider::CreateBitmap(
#endif
#ifdef OS_WIN
return wxIcon(wxT("save"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24);
#endif
}
if (id == ART_CLOSE) {
#ifdef OS_UNIX
return wxArtProvider::GetBitmap(wxT("gtk-close"), client, size);
#endif
#ifdef OS_WIN
return wxIcon(wxT("close"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
#endif
}
return wxNullBitmap;

View File

@ -147,7 +147,7 @@ SpekWindow::SpekWindow(const wxString& path) :
info_bar->Connect(wxEVT_LEFT_DOWN, wxCommandEventHandler(SpekWindow::on_visit));
info_sizer->Add(label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
wxBitmapButton *button = new wxBitmapButton(
info_bar, -1, wxArtProvider::GetBitmap(wxT("gtk-close")),
info_bar, -1, wxArtProvider::GetBitmap(ART_CLOSE, wxART_BUTTON),
wxDefaultPosition, wxDefaultSize, wxNO_BORDER);
button->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SpekWindow::on_close));
info_sizer->Add(button, 0, wxALIGN_CENTER_VERTICAL);