Use wxOverlay to show sash feedback in non-live resize mode in wxSplitterWindow

Make non-live resizing possible on all supported platforms thanks to wxOverlay.
Previously, live resizing was the only supported mode under these platforms:
wxMac, wxQt and wxGTK3 under Wayland.

Also remove no longer needed function AlwaysUsesLiveUpdate and its documentation.
This commit is contained in:
ali kettab 2024-01-25 03:10:23 +01:00 committed by AliKet
parent fafc714057
commit a38175885c
4 changed files with 44 additions and 70 deletions

View file

@ -254,7 +254,7 @@ MyFrame::MyFrame()
"Toggle sash invisibility");
splitMenu->AppendSeparator();
auto itemLive = splitMenu->AppendCheckItem(SPLIT_LIVE,
splitMenu->AppendCheckItem(SPLIT_LIVE,
"&Live update\tCtrl-L",
"Toggle live update mode");
splitMenu->AppendCheckItem(SPLIT_BORDER,
@ -306,12 +306,6 @@ MyFrame::MyFrame()
menuBar->Check(SPLIT_LIVE, true);
m_splitter = new MySplitterWindow(this);
if ( m_splitter->AlwaysUsesLiveUpdate() )
{
// Only live update mode is supported, so this menu item can't be used.
itemLive->Enable(false);
}
// If you use non-zero gravity you must initialize the splitter with its
// correct initial size, otherwise it will change the sash position by a
// huge amount when it's resized from its initial default size to its real