use <bitmapsize> to load bitmaps at the specified size in wxToolBar's XRC handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5f3dc0f0a9
commit
d0f063020e
@ -29,6 +29,7 @@ public:
|
||||
private:
|
||||
bool m_isInside;
|
||||
wxToolBar *m_toolbar;
|
||||
wxSize m_toolSize;
|
||||
};
|
||||
|
||||
#endif // wxUSE_XRC && wxUSE_TOOLBAR
|
||||
|
@ -123,17 +123,17 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
||||
}
|
||||
}
|
||||
|
||||
wxToolBarToolBase * const
|
||||
tool = m_toolbar->AddTool
|
||||
(
|
||||
GetID(),
|
||||
GetText(wxT("label")),
|
||||
GetBitmap(wxT("bitmap"), wxART_TOOLBAR),
|
||||
GetBitmap(wxT("bitmap2"), wxART_TOOLBAR),
|
||||
kind,
|
||||
GetText(wxT("tooltip")),
|
||||
GetText(wxT("longhelp"))
|
||||
);
|
||||
wxToolBarToolBase * const tool =
|
||||
m_toolbar->AddTool
|
||||
(
|
||||
GetID(),
|
||||
GetText(wxT("label")),
|
||||
GetBitmap(wxT("bitmap"), wxART_TOOLBAR, m_toolSize),
|
||||
GetBitmap(wxT("bitmap2"), wxART_TOOLBAR, m_toolSize),
|
||||
kind,
|
||||
GetText(wxT("tooltip")),
|
||||
GetText(wxT("longhelp"))
|
||||
);
|
||||
|
||||
if ( GetBool(wxT("disabled")) )
|
||||
m_toolbar->EnableTool(GetID(), false);
|
||||
@ -172,9 +172,9 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
||||
GetName());
|
||||
SetupWindow(toolbar);
|
||||
|
||||
wxSize bmpsize = GetSize(wxT("bitmapsize"));
|
||||
if (!(bmpsize == wxDefaultSize))
|
||||
toolbar->SetToolBitmapSize(bmpsize);
|
||||
m_toolSize = GetSize(wxT("bitmapsize"));
|
||||
if (!(m_toolSize == wxDefaultSize))
|
||||
toolbar->SetToolBitmapSize(m_toolSize);
|
||||
wxSize margins = GetSize(wxT("margins"));
|
||||
if (!(margins == wxDefaultSize))
|
||||
toolbar->SetMargins(margins.x, margins.y);
|
||||
|
Loading…
Reference in New Issue
Block a user