Added wxSplitterWindow::SetSashInvisible() and IsSashInvisible().
Also fix handling of wxSP_NOSASH. Closes #14074. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user