|
|
|
@ -41,16 +41,6 @@ |
|
|
|
#include <eda_doc.h>
|
|
|
|
|
|
|
|
|
|
|
|
static void setTextMargins( wxTextEntryBase* aEntry ) |
|
|
|
{ |
|
|
|
#if defined( __WXMSW__ )
|
|
|
|
aEntry->SetMargins( 2, 2 ); |
|
|
|
#elif defined( __WXGTK__ )
|
|
|
|
aEntry->SetMargins( 0, 0 ); |
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//-------- Renderer ---------------------------------------------------------------------
|
|
|
|
// None required; just render as normal text.
|
|
|
|
|
|
|
|
@ -69,7 +59,10 @@ wxString GRID_CELL_TEXT_BUTTON::GetValue() const |
|
|
|
|
|
|
|
void GRID_CELL_TEXT_BUTTON::SetSize( const wxRect& aRect ) |
|
|
|
{ |
|
|
|
Combo()->SetSize( aRect, wxSIZE_ALLOW_MINUS_ONE ); |
|
|
|
wxRect rect( aRect ); |
|
|
|
WX_GRID::CellEditorTransformSizeRect( rect ); |
|
|
|
|
|
|
|
wxGridCellEditor::SetSize( rect ); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -229,7 +222,7 @@ void GRID_CELL_SYMBOL_ID_EDITOR::Create( wxWindow* aParent, wxWindowID aId, |
|
|
|
wxEvtHandler* aEventHandler ) |
|
|
|
{ |
|
|
|
m_control = new TEXT_BUTTON_SYMBOL_CHOOSER( aParent, m_dlg, m_preselect ); |
|
|
|
setTextMargins( Combo() ); |
|
|
|
WX_GRID::CellEditorSetMargins( Combo() ); |
|
|
|
|
|
|
|
wxGridCellEditor::Create( aParent, aId, aEventHandler ); |
|
|
|
} |
|
|
|
@ -313,7 +306,7 @@ void GRID_CELL_FPID_EDITOR::Create( wxWindow* aParent, wxWindowID aId, |
|
|
|
wxEvtHandler* aEventHandler ) |
|
|
|
{ |
|
|
|
m_control = new TEXT_BUTTON_FP_CHOOSER( aParent, m_dlg, m_symbolNetlist, m_preselect ); |
|
|
|
setTextMargins( Combo() ); |
|
|
|
WX_GRID::CellEditorSetMargins( Combo() ); |
|
|
|
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
// validate text in textctrl, if validator is set
|
|
|
|
@ -365,7 +358,7 @@ void GRID_CELL_URL_EDITOR::Create( wxWindow* aParent, wxWindowID aId, |
|
|
|
wxEvtHandler* aEventHandler ) |
|
|
|
{ |
|
|
|
m_control = new TEXT_BUTTON_URL( aParent, m_dlg, m_searchStack ); |
|
|
|
setTextMargins( Combo() ); |
|
|
|
WX_GRID::CellEditorSetMargins( Combo() ); |
|
|
|
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
// validate text in textctrl, if validator is set
|
|
|
|
@ -523,7 +516,7 @@ void GRID_CELL_PATH_EDITOR::Create( wxWindow* aParent, wxWindowID aId, |
|
|
|
m_control = new TEXT_BUTTON_FILE_BROWSER( aParent, m_dlg, m_grid, m_currentDir, m_fileFilter, |
|
|
|
m_normalize, m_normalizeBasePath ); |
|
|
|
|
|
|
|
setTextMargins( Combo() ); |
|
|
|
WX_GRID::CellEditorSetMargins( Combo() ); |
|
|
|
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
// validate text in textctrl, if validator is set
|
|
|
|
|