Add missing text colour to symbol editor textbox dialog.

Fixes https://gitlab.com/kicad/code/kicad/issues/11770
This commit is contained in:
Jeff Young 2022-06-09 10:35:55 +01:00
parent b710982875
commit 6bfd106bed
5 changed files with 375 additions and 154 deletions

View File

@ -25,15 +25,16 @@
#include <symbol_editor_settings.h> #include <symbol_editor_settings.h>
#include <widgets/bitmap_button.h> #include <widgets/bitmap_button.h>
#include <widgets/font_choice.h> #include <widgets/font_choice.h>
#include <widgets/color_swatch.h>
#include <base_units.h> #include <base_units.h>
#include <general.h> #include <general.h>
#include <settings/color_settings.h>
#include <lib_textbox.h> #include <lib_textbox.h>
#include <confirm.h> #include <confirm.h>
#include <dialogs/html_message_box.h> #include <dialogs/html_message_box.h>
#include <string_utils.h> #include <string_utils.h>
#include <scintilla_tricks.h> #include <scintilla_tricks.h>
#include <dialog_lib_textbox_properties.h> #include <dialog_lib_textbox_properties.h>
#include <widgets/color_swatch.h>
#include "symbol_editor_drawing_tools.h" #include "symbol_editor_drawing_tools.h"
DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES( SYMBOL_EDIT_FRAME* aParent, DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES( SYMBOL_EDIT_FRAME* aParent,
@ -46,7 +47,11 @@ DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES( SYMBOL_EDIT_FRAME*
m_scintillaTricks( nullptr ), m_scintillaTricks( nullptr ),
m_helpWindow( nullptr ) m_helpWindow( nullptr )
{ {
COLOR_SETTINGS* colorSettings = m_frame->GetColorSettings();
COLOR4D schematicBackground = colorSettings->GetColor( LAYER_SCHEMATIC_BACKGROUND );
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED ); m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames ) for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
m_borderStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) ); m_borderStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
@ -54,6 +59,7 @@ DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES( SYMBOL_EDIT_FRAME*
m_borderStyleCombo->Append( DEFAULT_STYLE ); m_borderStyleCombo->Append( DEFAULT_STYLE );
m_fillColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED ); m_fillColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
m_fillColorSwatch->SetSwatchBackground( schematicBackground );
m_textCtrl->SetEOLMode( wxSTC_EOL_LF ); m_textCtrl->SetEOLMode( wxSTC_EOL_LF );
@ -65,6 +71,9 @@ DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES( SYMBOL_EDIT_FRAME*
m_textEntrySizer->AddGrowableRow( 0 ); m_textEntrySizer->AddGrowableRow( 0 );
m_textColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
m_textColorSwatch->SetSwatchBackground( schematicBackground );
SetInitialFocus( m_textCtrl ); SetInitialFocus( m_textCtrl );
m_separator1->SetIsSeparator(); m_separator1->SetIsSeparator();
@ -124,6 +133,7 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow()
m_fontCtrl->SetFontSelection( m_currentText->GetFont() ); m_fontCtrl->SetFontSelection( m_currentText->GetFont() );
m_textSize.SetValue( m_currentText->GetTextWidth() ); m_textSize.SetValue( m_currentText->GetTextWidth() );
m_textColorSwatch->SetSwatchColor( m_currentText->GetTextColor(), false );
m_bold->Check( m_currentText->IsBold() ); m_bold->Check( m_currentText->IsBold() );
m_italic->Check( m_currentText->IsItalic() ); m_italic->Check( m_currentText->IsItalic() );
@ -240,6 +250,7 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow()
} }
m_currentText->SetItalic( m_italic->IsChecked() ); m_currentText->SetItalic( m_italic->IsChecked() );
m_currentText->SetTextColor( m_textColorSwatch->GetSwatchColor() );
if( m_spin0->IsChecked() ) if( m_spin0->IsChecked() )
{ {

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -38,7 +38,6 @@ DIALOG_LIB_TEXTBOX_PROPERTIES_BASE::DIALOG_LIB_TEXTBOX_PROPERTIES_BASE( wxWindow
m_textCtrl->SetViewWhiteSpace( false ); m_textCtrl->SetViewWhiteSpace( false );
m_textCtrl->SetMarginWidth( 2, 0 ); m_textCtrl->SetMarginWidth( 2, 0 );
m_textCtrl->SetIndentationGuides( false ); m_textCtrl->SetIndentationGuides( false );
m_textCtrl->SetReadOnly( false );
m_textCtrl->SetMarginWidth( 1, 0 ); m_textCtrl->SetMarginWidth( 1, 0 );
m_textCtrl->SetMarginWidth( 0, 0 ); m_textCtrl->SetMarginWidth( 0, 0 );
m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS ); m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
@ -148,12 +147,38 @@ DIALOG_LIB_TEXTBOX_PROPERTIES_BASE::DIALOG_LIB_TEXTBOX_PROPERTIES_BASE( wxWindow
m_textSizeLabel->Wrap( -1 ); m_textSizeLabel->Wrap( -1 );
m_textEntrySizer->Add( m_textSizeLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_textEntrySizer->Add( m_textSizeLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_textSizeCtrl = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* bSizer71;
m_textEntrySizer->Add( m_textSizeCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer71 = new wxBoxSizer( wxHORIZONTAL );
m_textSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer71->Add( m_textSizeCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
m_textSizeUnits->Wrap( -1 ); m_textSizeUnits->Wrap( -1 );
m_textEntrySizer->Add( m_textSizeUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); bSizer71->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
m_textColorLabel = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
m_textColorLabel->Wrap( -1 );
bSizer71->Add( m_textColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
bSizer71->Add( 5, 0, 0, 0, 5 );
m_panelBorderColor1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
wxBoxSizer* bSizer221;
bSizer221 = new wxBoxSizer( wxVERTICAL );
m_textColorSwatch = new COLOR_SWATCH( m_panelBorderColor1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
bSizer221->Add( m_textColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_panelBorderColor1->SetSizer( bSizer221 );
m_panelBorderColor1->Layout();
bSizer221->Fit( m_panelBorderColor1 );
bSizer71->Add( m_panelBorderColor1, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_textEntrySizer->Add( bSizer71, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
m_textEntrySizer->Add( 0, 15, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_textEntrySizer->Add( 0, 15, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );

View File

@ -14,7 +14,6 @@
<property name="file">dialog_lib_textbox_properties_base</property> <property name="file">dialog_lib_textbox_properties_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property> <property name="indent_with_spaces"></property>
<property name="internationalize">1</property> <property name="internationalize">1</property>
<property name="name">dialog_lib_textbox_properties_base</property> <property name="name">dialog_lib_textbox_properties_base</property>
@ -26,7 +25,6 @@
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property> <property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property> <property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
@ -52,7 +50,6 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Text Box Properties</property> <property name="title">Text Box Properties</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -193,7 +190,6 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="read_only">0</property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
@ -367,7 +363,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -440,7 +435,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -513,7 +507,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -586,7 +579,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -659,7 +651,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -732,7 +723,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -805,7 +795,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -878,7 +867,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -951,7 +939,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -1024,7 +1011,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -1097,7 +1083,6 @@
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="bitmap"></property> <property name="bitmap"></property>
@ -1305,131 +1290,335 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="row">2</property> <property name="row">2</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_SIZE</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="name">bSizer71</property>
<property name="name">m_textSizeCtrl</property> <property name="orient">wxHORIZONTAL</property>
<property name="pane_border">1</property> <property name="permission">none</property>
<property name="pane_position"></property> <object class="sizeritem" expanded="1">
<property name="pane_size"></property> <property name="border">5</property>
<property name="permission">protected</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="pin_button">1</property> <property name="proportion">0</property>
<property name="pos"></property> <object class="wxTextCtrl" expanded="1">
<property name="resize">Resizable</property> <property name="BottomDockable">1</property>
<property name="show">1</property> <property name="LeftDockable">1</property>
<property name="size"></property> <property name="RightDockable">1</property>
<property name="style"></property> <property name="TopDockable">1</property>
<property name="subclass"></property> <property name="aui_layer"></property>
<property name="toolbar_pane">0</property> <property name="aui_name"></property>
<property name="tooltip"></property> <property name="aui_position"></property>
<property name="validator_data_type"></property> <property name="aui_row"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="best_size"></property>
<property name="validator_type">wxDefaultValidator</property> <property name="bg"></property>
<property name="validator_variable"></property> <property name="caption"></property>
<property name="value"></property> <property name="caption_visible">1</property>
<property name="window_extra_style"></property> <property name="center_pane">0</property>
<property name="window_name"></property> <property name="close_button">1</property>
<property name="window_style"></property> <property name="context_help"></property>
</object> <property name="context_menu">1</property>
</object> <property name="default_pane">0</property>
<object class="gbsizeritem" expanded="1"> <property name="dock">Dock</property>
<property name="border">5</property> <property name="dock_fixed">0</property>
<property name="colspan">1</property> <property name="docking">Left</property>
<property name="column">2</property> <property name="enabled">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property> <property name="fg"></property>
<property name="row">2</property> <property name="floatable">1</property>
<property name="rowspan">1</property> <property name="font"></property>
<object class="wxStaticText" expanded="1"> <property name="gripper">0</property>
<property name="BottomDockable">1</property> <property name="hidden">0</property>
<property name="LeftDockable">1</property> <property name="id">wxID_ANY</property>
<property name="RightDockable">1</property> <property name="max_size"></property>
<property name="TopDockable">1</property> <property name="maximize_button">0</property>
<property name="aui_layer"></property> <property name="maximum_size"></property>
<property name="aui_name"></property> <property name="maxlength">0</property>
<property name="aui_position"></property> <property name="min_size">-1,-1</property>
<property name="aui_row"></property> <property name="minimize_button">0</property>
<property name="best_size"></property> <property name="minimum_size">-1,-1</property>
<property name="bg"></property> <property name="moveable">1</property>
<property name="caption"></property> <property name="name">m_textSizeCtrl</property>
<property name="caption_visible">1</property> <property name="pane_border">1</property>
<property name="center_pane">0</property> <property name="pane_position"></property>
<property name="close_button">1</property> <property name="pane_size"></property>
<property name="context_help"></property> <property name="permission">protected</property>
<property name="context_menu">1</property> <property name="pin_button">1</property>
<property name="default_pane">0</property> <property name="pos"></property>
<property name="dock">Dock</property> <property name="resize">Resizable</property>
<property name="dock_fixed">0</property> <property name="show">1</property>
<property name="docking">Left</property> <property name="size">-1,-1</property>
<property name="enabled">1</property> <property name="style"></property>
<property name="fg"></property> <property name="subclass"></property>
<property name="floatable">1</property> <property name="toolbar_pane">0</property>
<property name="font"></property> <property name="tooltip"></property>
<property name="gripper">0</property> <property name="validator_data_type"></property>
<property name="hidden">0</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="id">wxID_ANY</property> <property name="validator_type">wxDefaultValidator</property>
<property name="label">mm</property> <property name="validator_variable"></property>
<property name="markup">0</property> <property name="value"></property>
<property name="max_size"></property> <property name="window_extra_style"></property>
<property name="maximize_button">0</property> <property name="window_name"></property>
<property name="maximum_size"></property> <property name="window_style"></property>
<property name="min_size"></property> </object>
<property name="minimize_button">0</property> </object>
<property name="minimum_size"></property> <object class="sizeritem" expanded="1">
<property name="moveable">1</property> <property name="border">3</property>
<property name="name">m_textSizeUnits</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="pane_border">1</property> <property name="proportion">0</property>
<property name="pane_position"></property> <object class="wxStaticText" expanded="1">
<property name="pane_size"></property> <property name="BottomDockable">1</property>
<property name="permission">protected</property> <property name="LeftDockable">1</property>
<property name="pin_button">1</property> <property name="RightDockable">1</property>
<property name="pos"></property> <property name="TopDockable">1</property>
<property name="resize">Resizable</property> <property name="aui_layer"></property>
<property name="show">1</property> <property name="aui_name"></property>
<property name="size"></property> <property name="aui_position"></property>
<property name="style"></property> <property name="aui_row"></property>
<property name="subclass"></property> <property name="best_size"></property>
<property name="toolbar_pane">0</property> <property name="bg"></property>
<property name="tooltip"></property> <property name="caption"></property>
<property name="window_extra_style"></property> <property name="caption_visible">1</property>
<property name="window_name"></property> <property name="center_pane">0</property>
<property name="window_style"></property> <property name="close_button">1</property>
<property name="wrap">-1</property> <property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">mm</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_textSizeUnits</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">15</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Color:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_textColorLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; Not forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">5</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxPanel" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_panelBorderColor1</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxBORDER_SIMPLE|wxTAB_TRAVERSAL</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer221</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="CustomControl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="class">COLOR_SWATCH</property>
<property name="close_button">1</property>
<property name="construction"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="declaration"></property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="include"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_textColorSwatch</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="settings"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">COLOR_SWATCH; widgets/color_swatch.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -31,8 +31,8 @@ class FONT_CHOICE;
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/hyperlink.h> #include <wx/hyperlink.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/checkbox.h>
#include <wx/bmpcbox.h> #include <wx/bmpcbox.h>
#include <wx/gbsizer.h> #include <wx/gbsizer.h>
#include <wx/statline.h> #include <wx/statline.h>
@ -48,11 +48,6 @@ class DIALOG_LIB_TEXTBOX_PROPERTIES_BASE : public DIALOG_SHIM
private: private:
protected: protected:
enum
{
wxID_SIZE = 1000
};
wxGridBagSizer* m_textEntrySizer; wxGridBagSizer* m_textEntrySizer;
wxStaticText* m_textLabel; wxStaticText* m_textLabel;
wxStyledTextCtrl* m_textCtrl; wxStyledTextCtrl* m_textCtrl;
@ -73,6 +68,9 @@ class DIALOG_LIB_TEXTBOX_PROPERTIES_BASE : public DIALOG_SHIM
wxStaticText* m_textSizeLabel; wxStaticText* m_textSizeLabel;
wxTextCtrl* m_textSizeCtrl; wxTextCtrl* m_textSizeCtrl;
wxStaticText* m_textSizeUnits; wxStaticText* m_textSizeUnits;
wxStaticText* m_textColorLabel;
wxPanel* m_panelBorderColor1;
COLOR_SWATCH* m_textColorSwatch;
wxCheckBox* m_borderCheckbox; wxCheckBox* m_borderCheckbox;
wxStaticText* m_borderWidthLabel; wxStaticText* m_borderWidthLabel;
wxTextCtrl* m_borderWidthCtrl; wxTextCtrl* m_borderWidthCtrl;
@ -94,7 +92,7 @@ class DIALOG_LIB_TEXTBOX_PROPERTIES_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, override them in your derived class // Virtual event handlers, overide them in your derived class
virtual void onMultiLineTCLostFocus( wxFocusEvent& event ) { event.Skip(); } virtual void onMultiLineTCLostFocus( wxFocusEvent& event ) { event.Skip(); }
virtual void OnFormattingHelp( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnFormattingHelp( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void onBorderChecked( wxCommandEvent& event ) { event.Skip(); } virtual void onBorderChecked( wxCommandEvent& event ) { event.Skip(); }
@ -104,7 +102,6 @@ class DIALOG_LIB_TEXTBOX_PROPERTIES_BASE : public DIALOG_SHIM
public: public:
DIALOG_LIB_TEXTBOX_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Box Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_LIB_TEXTBOX_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Box Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIB_TEXTBOX_PROPERTIES_BASE(); ~DIALOG_LIB_TEXTBOX_PROPERTIES_BASE();
}; };

View File

@ -1,7 +1,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -46,7 +46,6 @@ private:
void onSpinButton( wxCommandEvent &aEvent ); void onSpinButton( wxCommandEvent &aEvent );
void onBorderChecked( wxCommandEvent& event ) override; void onBorderChecked( wxCommandEvent& event ) override;
void onFillChecked( wxCommandEvent& event ) override; void onFillChecked( wxCommandEvent& event ) override;
void onFillSwatch( wxCommandEvent& aEvent );
void OnFormattingHelp( wxHyperlinkEvent& aEvent ) override; void OnFormattingHelp( wxHyperlinkEvent& aEvent ) override;
void onMultiLineTCLostFocus( wxFocusEvent& event ) override; void onMultiLineTCLostFocus( wxFocusEvent& event ) override;