X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6460ce5afe03b09a8f3832bbade88373f6050fc9..6be306d4dc596ee59bc4ea13288120297cb9562e:/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