#include "wx/settings.h"
#endif
+#ifdef __WXMAC__
+ #include "wx/mac/private.h"
+#endif
+
#include "wx/renderer.h"
#include "wx/splitter.h"
// following the mouse movement while it drags the sash, without it we only
// draw the sash at the new position but only resize the windows when the
// dragging is finished
+#if defined( __WXMAC__ ) && TARGET_API_MAC_OSX == 1
+ bool isLive = true ;
+#else
bool isLive = (GetWindowStyleFlag() & wxSP_LIVE_UPDATE) != 0;
-
+#endif
if (event.LeftDown())
{
if ( SashHitTest(x, y) )
if ( minSize == -1 || m_minimumPaneSize > minSize )
minSize = m_minimumPaneSize;
- int maxSize = window_size - minSize - GetBorderSize();
+ int maxSize = window_size - minSize - GetBorderSize() - GetSashSize();
if ( sashPos > maxSize )
sashPos = maxSize;
}
void wxSplitterWindow::SetSashPositionAndNotify(int sashPos)
{
+ // we must reset the request here, otherwise the sash would be stuck at
+ // old position if the user attempted to move the sash after invalid
+ // (e.g. smaller than minsize) sash position was requested using
+ // SetSashPosition():
+ m_requestedSashPosition = INT_MAX;
+
if ( DoSetSashPosition(sashPos) )
{
wxSplitterEvent event(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, this);