Use stock icons on win and gtk
This commit is contained in:
parent
0103c323bd
commit
72b1dbc4d7
@ -56,39 +56,36 @@ void MainFrame::SetupToolbar()
|
|||||||
#include "../../resources/xpm/copy.xpm"
|
#include "../../resources/xpm/copy.xpm"
|
||||||
#include "../../resources/xpm/scissors.xpm"
|
#include "../../resources/xpm/scissors.xpm"
|
||||||
#include "../../resources/xpm/clipboard.xpm"
|
#include "../../resources/xpm/clipboard.xpm"
|
||||||
|
|
||||||
|
wxBitmap new_file_icon(file_add);
|
||||||
|
wxBitmap open_file_icon(folder);
|
||||||
|
wxBitmap save_file_icon(diskette);
|
||||||
|
wxBitmap close_file_icon(close);
|
||||||
|
wxBitmap copy_icon(copy);
|
||||||
|
wxBitmap cut_icon(scissors);
|
||||||
|
wxBitmap paste_icon(clipboard);
|
||||||
#else
|
#else
|
||||||
#include "../../resources/xpm/small/file_add.xpm"
|
wxBitmap new_file_icon = wxArtProvider::GetBitmap(wxART_NEW);
|
||||||
#include "../../resources/xpm/small/folder.xpm"
|
wxBitmap open_file_icon = wxArtProvider::GetBitmap(wxART_FILE_OPEN);
|
||||||
#include "../../resources/xpm/small/diskette.xpm"
|
wxBitmap save_file_icon = wxArtProvider::GetBitmap(wxART_FILE_SAVE);
|
||||||
#include "../../resources/xpm/small/close.xpm"
|
wxBitmap close_file_icon = wxArtProvider::GetBitmap(wxART_CLOSE);
|
||||||
#include "../../resources/xpm/small/copy.xpm"
|
wxBitmap copy_icon = wxArtProvider::GetBitmap(wxART_COPY);
|
||||||
#include "../../resources/xpm/small/scissors.xpm"
|
wxBitmap cut_icon = wxArtProvider::GetBitmap(wxART_CUT);
|
||||||
#include "../../resources/xpm/small/clipboard.xpm"
|
wxBitmap paste_icon = wxArtProvider::GetBitmap(wxART_PASTE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL);
|
CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL);
|
||||||
|
|
||||||
toolBar = GetToolBar();
|
toolBar = GetToolBar();
|
||||||
|
|
||||||
vector<wxBitmap> bitmaps;
|
toolBar->AddTool(wxID_NEW, "New", new_file_icon, "New file");
|
||||||
|
toolBar->AddTool(wxID_OPEN, "Open", open_file_icon, "Open file");
|
||||||
bitmaps.push_back(wxBitmap(file_add));
|
toolBar->AddTool(wxID_SAVE, "Save", save_file_icon, "Save file");
|
||||||
bitmaps.push_back(wxBitmap(folder));
|
toolBar->AddTool(wxID_CLOSE, "Close", close_file_icon, "Close file");
|
||||||
bitmaps.push_back(wxBitmap(diskette));
|
|
||||||
bitmaps.push_back(wxBitmap(close));
|
|
||||||
bitmaps.push_back(wxBitmap(copy));
|
|
||||||
bitmaps.push_back(wxBitmap(scissors));
|
|
||||||
bitmaps.push_back(wxBitmap(clipboard));
|
|
||||||
|
|
||||||
toolBar->AddTool(wxID_NEW, "New", bitmaps[0], "New file");
|
|
||||||
toolBar->AddTool(wxID_OPEN, "Open", bitmaps[1], "Open file");
|
|
||||||
toolBar->AddTool(wxID_SAVE, "Save", bitmaps[2], "Save file");
|
|
||||||
toolBar->AddTool(wxID_CLOSE, "Close", bitmaps[3], "Close file");
|
|
||||||
toolBar->AddSeparator();
|
toolBar->AddSeparator();
|
||||||
toolBar->AddTool(wxID_COPY, "Copy", bitmaps[4], "Copy");
|
toolBar->AddTool(wxID_COPY, "Copy", copy_icon, "Copy");
|
||||||
toolBar->AddTool(wxID_CUT, "Cut", bitmaps[5], "Cut");
|
toolBar->AddTool(wxID_CUT, "Cut", cut_icon, "Cut");
|
||||||
toolBar->AddTool(wxID_PASTE, "Paste", bitmaps[6], "Paste");
|
toolBar->AddTool(wxID_PASTE, "Paste", paste_icon, "Paste");
|
||||||
//toolBar->AddTool(wxID_ANY, "Settings", bitmaps[4], "Change Settings");
|
|
||||||
|
|
||||||
toolBar->Realize();
|
toolBar->Realize();
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <wx/stdpaths.h>
|
#include <wx/stdpaths.h>
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
|
||||||
#include "definitions.h"
|
#include "definitions.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user