Yet more fixes for wxNotebook compatibility...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -257,19 +257,26 @@ void wxWebKitCtrl::SetPageSource(wxString& source, const wxString& baseUrl){
|
|||||||
void wxWebKitCtrl::OnSize(wxSizeEvent &event){
|
void wxWebKitCtrl::OnSize(wxSizeEvent &event){
|
||||||
wxWindow* parent = GetParent();
|
wxWindow* parent = GetParent();
|
||||||
bool inNotebook = false;
|
bool inNotebook = false;
|
||||||
int x, y;
|
int x = 0;
|
||||||
|
int y = 18;
|
||||||
while(parent != NULL)
|
while(parent != NULL)
|
||||||
{
|
{
|
||||||
|
x += parent->GetPosition().x;
|
||||||
|
y += parent->GetPosition().y;
|
||||||
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) ){
|
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) ){
|
||||||
NSRect bounds = [m_webView frame];
|
inNotebook = true;
|
||||||
bounds.origin.x += parent->GetPosition().x;
|
|
||||||
bounds.origin.y += 18;
|
|
||||||
[m_webView setFrame:bounds];
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
parent = parent->GetParent();
|
parent = parent->GetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (inNotebook){
|
||||||
|
NSRect bounds = [m_webView frame];
|
||||||
|
bounds.origin.x += x;
|
||||||
|
bounds.origin.y += y;
|
||||||
|
[m_webView setFrame:bounds];
|
||||||
|
}
|
||||||
|
|
||||||
[m_webView display];
|
[m_webView display];
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user