Fixed palette so all tools are visible
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,13 +36,11 @@
|
|||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
|
|
||||||
// Include pixmaps
|
// Include pixmaps
|
||||||
#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
|
|
||||||
#include "bitmaps/arrow.xpm"
|
#include "bitmaps/arrow.xpm"
|
||||||
#include "bitmaps/tool1.xpm"
|
#include "bitmaps/tool1.xpm"
|
||||||
#include "bitmaps/tool2.xpm"
|
#include "bitmaps/tool2.xpm"
|
||||||
#include "bitmaps/tool3.xpm"
|
#include "bitmaps/tool3.xpm"
|
||||||
#include "bitmaps/tool4.xpm"
|
#include "bitmaps/tool4.xpm"
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Object editor tool palette
|
* Object editor tool palette
|
||||||
@@ -54,10 +52,6 @@ EditorToolPalette::EditorToolPalette(wxWindow* parent, const wxPoint& pos, const
|
|||||||
TOOLPALETTECLASS(parent, -1, pos, size, style)
|
TOOLPALETTECLASS(parent, -1, pos, size, style)
|
||||||
{
|
{
|
||||||
currentlySelected = -1;
|
currentlySelected = -1;
|
||||||
|
|
||||||
#if 1 // ndef __WXGTK__
|
|
||||||
SetMaxRowsCols(1000, 1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorToolPalette::OnLeftClick(int toolIndex, bool toggled)
|
bool EditorToolPalette::OnLeftClick(int toolIndex, bool toggled)
|
||||||
@@ -86,14 +80,15 @@ void EditorToolPalette::SetSize(int x, int y, int width, int height, int sizeFla
|
|||||||
|
|
||||||
EditorToolPalette *MyApp::CreatePalette(wxFrame *parent)
|
EditorToolPalette *MyApp::CreatePalette(wxFrame *parent)
|
||||||
{
|
{
|
||||||
// Load palette bitmaps
|
// Load palette bitmaps. MSW-specific bitmaps no
|
||||||
#ifdef __WXMSW__
|
// longer needed.
|
||||||
|
#if 0
|
||||||
wxBitmap PaletteTool1(_T("TOOL1"));
|
wxBitmap PaletteTool1(_T("TOOL1"));
|
||||||
wxBitmap PaletteTool2(_T("TOOL2"));
|
wxBitmap PaletteTool2(_T("TOOL2"));
|
||||||
wxBitmap PaletteTool3(_T("TOOL3"));
|
wxBitmap PaletteTool3(_T("TOOL3"));
|
||||||
wxBitmap PaletteTool4(_T("TOOL4"));
|
wxBitmap PaletteTool4(_T("TOOL4"));
|
||||||
wxBitmap PaletteArrow(_T("ARROWTOOL"));
|
wxBitmap PaletteArrow(_T("ARROWTOOL"));
|
||||||
#elif defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
|
#else
|
||||||
wxBitmap PaletteTool1(tool1_xpm);
|
wxBitmap PaletteTool1(tool1_xpm);
|
||||||
wxBitmap PaletteTool2(tool2_xpm);
|
wxBitmap PaletteTool2(tool2_xpm);
|
||||||
wxBitmap PaletteTool3(tool3_xpm);
|
wxBitmap PaletteTool3(tool3_xpm);
|
||||||
@@ -101,7 +96,8 @@ EditorToolPalette *MyApp::CreatePalette(wxFrame *parent)
|
|||||||
wxBitmap PaletteArrow(arrow_xpm);
|
wxBitmap PaletteArrow(arrow_xpm);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EditorToolPalette *palette = new EditorToolPalette(parent, wxPoint(0, 0), wxSize(-1, -1), wxTB_HORIZONTAL);
|
EditorToolPalette *palette = new EditorToolPalette(parent, wxPoint(0, 0), wxSize(-1, -1),
|
||||||
|
wxTB_VERTICAL);
|
||||||
|
|
||||||
palette->SetMargins(2, 2);
|
palette->SetMargins(2, 2);
|
||||||
palette->SetToolBitmapSize(wxSize(22, 22));
|
palette->SetToolBitmapSize(wxSize(22, 22));
|
||||||
|
Reference in New Issue
Block a user