// define this to use XPMs everywhere (by default, BMPs are used under Win)
// BMPs use less space, but aren't compiled into the executable on other platforms
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#define USE_XPM_BITMAPS 0
#else
#define USE_XPM_BITMAPS 1
// resources
// ----------------------------------------------------------------------------
-#if !defined(__WXMSW__) && !defined(__WXPM__)
+#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "../sample.xpm"
#endif
// the changes
toolBar->Realize();
- toolBar->SetRows(!(toolBar->IsVertical()) ? m_rows : 10 / m_rows);
+ toolBar->SetRows(toolBar->IsVertical() ? toolBar->GetToolsCount() / m_rows
+ : m_rows);
}
// ----------------------------------------------------------------------------
// m_rows may be only 1 or 2
m_rows = 3 - m_rows;
- GetToolBar()->SetRows(!(GetToolBar()->IsVertical()) ? m_rows : 10 / m_rows);
+ wxToolBar* const toolBar = GetToolBar();
+ toolBar->SetRows(toolBar->IsVertical() ? toolBar->GetToolsCount() / m_rows
+ : m_rows);
//RecreateToolbar(); -- this is unneeded
}