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