Fix a display issue in wxStyledTextCtrl widgets in dialogs (Windows specific).
It happens when a text is using some esoteric unicode chars. Fixes #15314 https://gitlab.com/kicad/code/kicad/-/issues/15314
This commit is contained in:
parent
cb4289fd19
commit
8625a59d4c
|
@ -73,8 +73,16 @@ DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent, const
|
|||
{
|
||||
wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
|
||||
} );
|
||||
|
||||
m_StyledTextCtrl->SetEOLMode( wxSTC_EOL_LF ); // Normalize EOL across platforms
|
||||
|
||||
#ifdef _WIN32
|
||||
// Without this setting, on Windows, some esoteric unicode chars create display issue
|
||||
// in a wxStyledTextCtrl.
|
||||
// for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY
|
||||
m_StyledTextCtrl->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
|
||||
#endif
|
||||
|
||||
m_textColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||
m_textColorSwatch->SetSwatchBackground( schematicBackground );
|
||||
|
||||
|
|
|
@ -64,6 +64,13 @@ DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES( SYMBOL_EDIT_FRAME*
|
|||
|
||||
m_textCtrl->SetEOLMode( wxSTC_EOL_LF );
|
||||
|
||||
#ifdef _WIN32
|
||||
// Without this setting, on Windows, some esoteric unicode chars create display issue
|
||||
// in a wxStyledTextCtrl.
|
||||
// for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY
|
||||
m_textCtrl->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
|
||||
#endif
|
||||
|
||||
m_scintillaTricks = new SCINTILLA_TRICKS( m_textCtrl, wxT( "{}" ), false,
|
||||
[this]()
|
||||
{
|
||||
|
|
|
@ -102,6 +102,13 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_ITE
|
|||
|
||||
m_textCtrl->SetEOLMode( wxSTC_EOL_LF );
|
||||
|
||||
#ifdef _WIN32
|
||||
// Without this setting, on Windows, some esoteric unicode chars create display issue
|
||||
// in a wxStyledTextCtrl.
|
||||
// for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY
|
||||
m_textCtrl->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
|
||||
#endif
|
||||
|
||||
m_scintillaTricks = new SCINTILLA_TRICKS( m_textCtrl, wxT( "{}" ), false,
|
||||
[this]()
|
||||
{
|
||||
|
|
|
@ -83,6 +83,14 @@ PROPERTIES_FRAME::PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent ) :
|
|||
m_stcText->SetUseVerticalScrollBar( false );
|
||||
m_stcText->SetUseHorizontalScrollBar( false );
|
||||
m_stcText->SetEOLMode( wxSTC_EOL_LF ); // Always use LF as eol char, regardless the platform
|
||||
|
||||
#ifdef _WIN32
|
||||
// Without this setting, on Windows, some esoteric unicode chars create display issue
|
||||
// in a wxStyledTextCtrl.
|
||||
// for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY
|
||||
m_stcText->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
|
||||
#endif
|
||||
|
||||
m_scintillaTricks = new SCINTILLA_TRICKS( m_stcText, wxT( "{}" ), false );
|
||||
|
||||
m_staticTextSizeInfo->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||
|
|
|
@ -61,6 +61,13 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO
|
|||
|
||||
m_MultiLineText->SetEOLMode( wxSTC_EOL_LF );
|
||||
|
||||
#ifdef _WIN32
|
||||
// Without this setting, on Windows, some esoteric unicode chars create display issue
|
||||
// in a wxStyledTextCtrl.
|
||||
// for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY
|
||||
m_MultiLineText->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
|
||||
#endif
|
||||
|
||||
m_scintillaTricks = new SCINTILLA_TRICKS( m_MultiLineText, wxT( "{}" ), false,
|
||||
[this]()
|
||||
{
|
||||
|
|
|
@ -54,6 +54,13 @@ DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES( PCB_BASE_EDIT_FRAME* aPare
|
|||
{
|
||||
m_MultiLineText->SetEOLMode( wxSTC_EOL_LF );
|
||||
|
||||
#ifdef _WIN32
|
||||
// Without this setting, on Windows, some esoteric unicode chars create display issue
|
||||
// in a wxStyledTextCtrl.
|
||||
// for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY
|
||||
m_MultiLineText->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
|
||||
#endif
|
||||
|
||||
m_scintillaTricks = new SCINTILLA_TRICKS( m_MultiLineText, wxT( "{}" ), false,
|
||||
[this]()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue