Added UpdateSize to wxSplitterWindow, to allow an app
to force pane resizing _before_ showing the window. Added a call to UpdateSize from helpfrm.cpp. Without this, the flicker is horrible. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
52a15d5b96
commit
7e521b01c3
@ -129,6 +129,11 @@ public:
|
||||
// parameter should be NULL)
|
||||
bool ReplaceWindow(wxWindow *winOld, wxWindow *winNew);
|
||||
|
||||
// Make sure the child window sizes are updated. This is useful
|
||||
// for reducing flicker by updating the sizes before a
|
||||
// window is shown, if you know the overall size is correct.
|
||||
void UpdateSize();
|
||||
|
||||
// Is the window split?
|
||||
bool IsSplit() const { return (m_windowTwo != NULL); }
|
||||
|
||||
|
@ -801,6 +801,16 @@ void wxSplitterWindow::SetSashPosition(int position, bool redraw)
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the child window sizes are updated. This is useful
|
||||
// for reducing flicker by updating the sizes before a
|
||||
// window is shown, if you know the overall size is correct.
|
||||
void wxSplitterWindow::UpdateSize()
|
||||
{
|
||||
m_checkRequestedSashPosition = true;
|
||||
SizeWindows();
|
||||
m_checkRequestedSashPosition = false;
|
||||
}
|
||||
|
||||
bool wxSplitterWindow::DoSendEvent(wxSplitterEvent& event)
|
||||
{
|
||||
return !GetEventHandler()->ProcessEvent(event) || event.IsAllowed();
|
||||
|
@ -148,6 +148,7 @@ void wxHtmlHelpController::CreateHelpWindow()
|
||||
|
||||
m_helpFrame->Create(NULL, wxID_HTML_HELPFRAME, wxEmptyString, m_FrameStyle);
|
||||
m_helpFrame->SetTitleFormat(m_titleFormat);
|
||||
|
||||
m_helpFrame->Show(TRUE);
|
||||
}
|
||||
|
||||
|
@ -490,6 +490,13 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
|
||||
}
|
||||
}
|
||||
|
||||
// Reduce flicker by updating the splitter pane sizes before the
|
||||
// frame is shown
|
||||
wxSizeEvent sizeEvent(GetSize(), GetId());
|
||||
ProcessEvent(sizeEvent);
|
||||
|
||||
m_Splitter->UpdateSize();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user