Corrected wxWindow::GetExtent
s econd attempt at accelerators (mdi sample works) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -193,11 +193,17 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
int command = win->GetAcceleratorTable()->GetCommand( event );
|
||||
if (command != -1)
|
||||
{
|
||||
wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
|
||||
ret = win->GetEventHandler()->ProcessEvent( command_event );
|
||||
wxWindow *ancestor = win;
|
||||
while (ancestor)
|
||||
{
|
||||
int command = ancestor->GetAcceleratorTable()->GetCommand( event );
|
||||
if (command != -1)
|
||||
{
|
||||
wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
|
||||
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
|
||||
break;
|
||||
}
|
||||
ancestor = ancestor->GetParent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1404,7 +1410,7 @@ void wxWindow::GetTextExtent( const wxString& string, int *x, int *y,
|
||||
if (theFont) fontToUse = *theFont;
|
||||
|
||||
GdkFont *font = fontToUse.GetInternalFont( 1.0 );
|
||||
if (x) (*y) = gdk_string_width( font, string );
|
||||
if (x) (*x) = gdk_string_width( font, string );
|
||||
if (y) (*y) = font->ascent + font->descent;
|
||||
if (descent) (*descent) = font->descent;
|
||||
if (externalLeading) (*externalLeading) = 0; // ??
|
||||
|
Reference in New Issue
Block a user