X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/81f2b2ee81ce76fdc826e2740713e6fbefbfd5b3..c0430d964dca888a28eff26436e6360a7b79b65f:/src/generic/splitter.cpp diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index dee38940af..77b246750c 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -496,7 +496,18 @@ bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance) return z >= hitMin && z <= hitMax; } +void wxSplitterWindow::SetSashInvisible(bool invisible) +{ + if ( IsSashInvisible() != invisible ) + ToggleWindowStyle(wxSP_NOSASH); +} + int wxSplitterWindow::GetSashSize() const +{ + return IsSashInvisible() ? 0 : GetDefaultSashSize(); +} + +int wxSplitterWindow::GetDefaultSashSize() const { return wxRendererNative::Get().GetSplitterParams(this).widthSash; } @@ -522,7 +533,7 @@ void wxSplitterWindow::DrawSash(wxDC& dc) return; // nor if we're configured to not show it - if ( HasFlag(wxSP_NOSASH) ) + if ( IsSashInvisible() ) return; wxRendererNative::Get().DrawSplitterSash