Improve custom grid cell editors' margins on MSW.
This commit is contained in:
parent
aa51cc5167
commit
1516aaf163
|
@ -41,6 +41,16 @@
|
||||||
#include <eda_doc.h>
|
#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 ---------------------------------------------------------------------
|
//-------- Renderer ---------------------------------------------------------------------
|
||||||
// None required; just render as normal text.
|
// None required; just render as normal text.
|
||||||
|
|
||||||
|
@ -217,8 +227,7 @@ void GRID_CELL_SYMBOL_ID_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||||
wxEvtHandler* aEventHandler )
|
wxEvtHandler* aEventHandler )
|
||||||
{
|
{
|
||||||
m_control = new TEXT_BUTTON_SYMBOL_CHOOSER( aParent, m_dlg, m_preselect );
|
m_control = new TEXT_BUTTON_SYMBOL_CHOOSER( aParent, m_dlg, m_preselect );
|
||||||
|
setTextMargins( Combo() );
|
||||||
Combo()->SetMargins( 0, 0 );
|
|
||||||
|
|
||||||
wxGridCellEditor::Create( aParent, aId, aEventHandler );
|
wxGridCellEditor::Create( aParent, aId, aEventHandler );
|
||||||
}
|
}
|
||||||
|
@ -286,8 +295,7 @@ void GRID_CELL_FPID_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||||
wxEvtHandler* aEventHandler )
|
wxEvtHandler* aEventHandler )
|
||||||
{
|
{
|
||||||
m_control = new TEXT_BUTTON_FP_CHOOSER( aParent, m_dlg, m_symbolNetlist, m_preselect );
|
m_control = new TEXT_BUTTON_FP_CHOOSER( aParent, m_dlg, m_symbolNetlist, m_preselect );
|
||||||
|
setTextMargins( Combo() );
|
||||||
Combo()->SetMargins( 0, 0 );
|
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
// validate text in textctrl, if validator is set
|
// validate text in textctrl, if validator is set
|
||||||
|
@ -339,8 +347,7 @@ void GRID_CELL_URL_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||||
wxEvtHandler* aEventHandler )
|
wxEvtHandler* aEventHandler )
|
||||||
{
|
{
|
||||||
m_control = new TEXT_BUTTON_URL( aParent, m_dlg, m_searchStack );
|
m_control = new TEXT_BUTTON_URL( aParent, m_dlg, m_searchStack );
|
||||||
|
setTextMargins( Combo() );
|
||||||
Combo()->SetMargins( 0, 0 );
|
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
// validate text in textctrl, if validator is set
|
// validate text in textctrl, if validator is set
|
||||||
|
@ -498,7 +505,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_control = new TEXT_BUTTON_FILE_BROWSER( aParent, m_dlg, m_grid, m_currentDir, m_fileFilter,
|
||||||
m_normalize, m_normalizeBasePath );
|
m_normalize, m_normalizeBasePath );
|
||||||
|
|
||||||
Combo()->SetMargins( 0, 0 );
|
setTextMargins( Combo() );
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
// validate text in textctrl, if validator is set
|
// validate text in textctrl, if validator is set
|
||||||
|
|
Loading…
Reference in New Issue