Small correction to list ctrl and default button size.
text ctrl doesn't inherit BG colour anymore added missing file. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
BIN
samples/image/horse.bmp
Normal file
BIN
samples/image/horse.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
@@ -178,7 +178,7 @@ void MyFrame::OnAddPage(wxCommandEvent& WXUNUSED(event))
|
||||
wxPanel *panel = new wxPanel( m_notebook, -1 );
|
||||
(void)new wxButton( panel, -1, "Button", wxPoint( 10,10 ), wxSize(-1,-1) );
|
||||
m_notebook->AddPage( panel, "Added" );
|
||||
m_notebook->SetSelection( m_notebook->GetPageCount()-1 );
|
||||
// m_notebook->SetSelection( m_notebook->GetPageCount()-1 );
|
||||
}
|
||||
|
||||
void MyFrame::OnDeletePage(wxCommandEvent& WXUNUSED(event))
|
||||
|
@@ -1424,6 +1424,14 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
ke.SetEventObject( parent );
|
||||
if (parent->GetEventHandler()->ProcessEvent( ke )) return;
|
||||
|
||||
if (event.KeyCode() == WXK_TAB)
|
||||
{
|
||||
wxNavigationKeyEvent nevent;
|
||||
nevent.SetDirection( !event.ShiftDown() );
|
||||
nevent.SetCurrentFocus( m_parent );
|
||||
if (m_parent->GetEventHandler()->ProcessEvent( nevent )) return;
|
||||
}
|
||||
|
||||
/* no item -> nothing to do */
|
||||
if (!m_current)
|
||||
{
|
||||
|
@@ -256,7 +256,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
|
||||
gtk_text_set_editable( GTK_TEXT(m_text), 1 );
|
||||
}
|
||||
|
||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||
SetBackgroundColour( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) );
|
||||
SetForegroundColour( parent->GetForegroundColour() );
|
||||
|
||||
Show( TRUE );
|
||||
|
@@ -1980,11 +1980,13 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
||||
|
||||
int border = 0;
|
||||
int bottom_border = 0;
|
||||
|
||||
if (GTK_WIDGET_CAN_DEFAULT(m_widget))
|
||||
{
|
||||
/* the default button has a border around it */
|
||||
border = 5;
|
||||
border = 6;
|
||||
bottom_border = 5;
|
||||
}
|
||||
|
||||
/* this is the result of hours of debugging: the following code
|
||||
@@ -2013,7 +2015,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
m_x-border,
|
||||
m_y-border,
|
||||
m_width+2*border,
|
||||
m_height+2*border );
|
||||
m_height+border+bottom_border );
|
||||
}
|
||||
|
||||
m_sizeSet = TRUE;
|
||||
|
@@ -256,7 +256,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
|
||||
gtk_text_set_editable( GTK_TEXT(m_text), 1 );
|
||||
}
|
||||
|
||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||
SetBackgroundColour( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) );
|
||||
SetForegroundColour( parent->GetForegroundColour() );
|
||||
|
||||
Show( TRUE );
|
||||
|
@@ -1980,11 +1980,13 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
||||
|
||||
int border = 0;
|
||||
int bottom_border = 0;
|
||||
|
||||
if (GTK_WIDGET_CAN_DEFAULT(m_widget))
|
||||
{
|
||||
/* the default button has a border around it */
|
||||
border = 5;
|
||||
border = 6;
|
||||
bottom_border = 5;
|
||||
}
|
||||
|
||||
/* this is the result of hours of debugging: the following code
|
||||
@@ -2013,7 +2015,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
m_x-border,
|
||||
m_y-border,
|
||||
m_width+2*border,
|
||||
m_height+2*border );
|
||||
m_height+border+bottom_border );
|
||||
}
|
||||
|
||||
m_sizeSet = TRUE;
|
||||
|
Reference in New Issue
Block a user