Skip to content

Commit 2b33a03

Browse files
committed
Make Edit Text & Graphics dialogs more similar.
Also a bunch of cleanup for dialog heading format and info sizes. Also fixups for consistency of syntax help (should be a link, not a button) Fixes https://gitlab.com/kicad/code/kicad/-/issues/20790
1 parent 00f2b5a commit 2b33a03

File tree

76 files changed

+10838
-10405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+10838
-10405
lines changed

common/dialogs/panel_setup_netclasses_base.cpp

+10-16
Original file line numberDiff line numberDiff line change
@@ -76,34 +76,28 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
7676

7777
// Cell Defaults
7878
m_netclassGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
79-
bUpperSizer->Add( m_netclassGrid, 1, wxEXPAND|wxFIXED_MINSIZE|wxLEFT|wxRIGHT|wxTOP, 5 );
79+
bUpperSizer->Add( m_netclassGrid, 1, wxEXPAND|wxFIXED_MINSIZE|wxRIGHT|wxLEFT, 5 );
8080

8181
wxBoxSizer* buttonBoxSizer;
8282
buttonBoxSizer = new wxBoxSizer( wxHORIZONTAL );
8383

8484
m_addButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
85-
buttonBoxSizer->Add( m_addButton, 0, wxLEFT, 2 );
86-
87-
88-
buttonBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
89-
90-
m_removeButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
91-
buttonBoxSizer->Add( m_removeButton, 0, wxBOTTOM|wxLEFT, 5 );
92-
93-
94-
buttonBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
85+
buttonBoxSizer->Add( m_addButton, 0, wxBOTTOM|wxLEFT, 2 );
9586

9687
m_moveUpButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
9788
buttonBoxSizer->Add( m_moveUpButton, 0, wxBOTTOM|wxLEFT, 5 );
9889

90+
m_moveDownButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
91+
buttonBoxSizer->Add( m_moveDownButton, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
92+
9993

10094
buttonBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
10195

102-
m_moveDownButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
103-
buttonBoxSizer->Add( m_moveDownButton, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
96+
m_removeButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
97+
buttonBoxSizer->Add( m_removeButton, 0, wxBOTTOM|wxLEFT, 5 );
10498

10599

106-
buttonBoxSizer->Add( 60, 0, 1, wxEXPAND, 5 );
100+
buttonBoxSizer->Add( 40, 0, 1, wxEXPAND, 5 );
107101

108102
m_colorDefaultHelpText = new wxStaticText( m_netclassesPane, wxID_ANY, _("Set color to transparent to use KiCad default color."), wxDefaultPosition, wxDefaultSize, 0 );
109103
m_colorDefaultHelpText->Wrap( -1 );
@@ -209,9 +203,9 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
209203
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnUpdateUI ) );
210204
m_netclassGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnSizeNetclassGrid ), NULL, this );
211205
m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnAddNetclassClick ), NULL, this );
212-
m_removeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnRemoveNetclassClick ), NULL, this );
213206
m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnMoveNetclassUpClick ), NULL, this );
214207
m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnMoveNetclassDownClick ), NULL, this );
208+
m_removeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnRemoveNetclassClick ), NULL, this );
215209
m_importColorsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnImportColorsClick ), NULL, this );
216210
m_membershipPane->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::onmembershipPanelSize ), NULL, this );
217211
m_assignmentGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnSizeAssignmentGrid ), NULL, this );
@@ -226,9 +220,9 @@ PANEL_SETUP_NETCLASSES_BASE::~PANEL_SETUP_NETCLASSES_BASE()
226220
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnUpdateUI ) );
227221
m_netclassGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnSizeNetclassGrid ), NULL, this );
228222
m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnAddNetclassClick ), NULL, this );
229-
m_removeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnRemoveNetclassClick ), NULL, this );
230223
m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnMoveNetclassUpClick ), NULL, this );
231224
m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnMoveNetclassDownClick ), NULL, this );
225+
m_removeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnRemoveNetclassClick ), NULL, this );
232226
m_importColorsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnImportColorsClick ), NULL, this );
233227
m_membershipPane->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::onmembershipPanelSize ), NULL, this );
234228
m_assignmentGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnSizeAssignmentGrid ), NULL, this );

common/dialogs/panel_setup_netclasses_base.fbp

+14-34
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
</object>
265265
<object class="sizeritem" expanded="false">
266266
<property name="border">5</property>
267-
<property name="flag">wxEXPAND|wxFIXED_MINSIZE|wxLEFT|wxRIGHT|wxTOP</property>
267+
<property name="flag">wxEXPAND|wxFIXED_MINSIZE|wxRIGHT|wxLEFT</property>
268268
<property name="proportion">1</property>
269269
<object class="wxGrid" expanded="false">
270270
<property name="BottomDockable">1</property>
@@ -363,7 +363,7 @@
363363
<property name="permission">none</property>
364364
<object class="sizeritem" expanded="false">
365365
<property name="border">2</property>
366-
<property name="flag">wxLEFT</property>
366+
<property name="flag">wxBOTTOM|wxLEFT</property>
367367
<property name="proportion">0</property>
368368
<object class="wxBitmapButton" expanded="false">
369369
<property name="BottomDockable">1</property>
@@ -437,20 +437,10 @@
437437
</object>
438438
</object>
439439
<object class="sizeritem" expanded="true">
440-
<property name="border">5</property>
441-
<property name="flag">wxEXPAND</property>
442-
<property name="proportion">0</property>
443-
<object class="spacer" expanded="true">
444-
<property name="height">0</property>
445-
<property name="permission">protected</property>
446-
<property name="width">20</property>
447-
</object>
448-
</object>
449-
<object class="sizeritem" expanded="false">
450440
<property name="border">5</property>
451441
<property name="flag">wxBOTTOM|wxLEFT</property>
452442
<property name="proportion">0</property>
453-
<object class="wxBitmapButton" expanded="false">
443+
<object class="wxBitmapButton" expanded="true">
454444
<property name="BottomDockable">1</property>
455445
<property name="LeftDockable">1</property>
456446
<property name="RightDockable">1</property>
@@ -495,7 +485,7 @@
495485
<property name="minimize_button">0</property>
496486
<property name="minimum_size">-1,-1</property>
497487
<property name="moveable">1</property>
498-
<property name="name">m_removeButton</property>
488+
<property name="name">m_moveUpButton</property>
499489
<property name="pane_border">1</property>
500490
<property name="pane_position"></property>
501491
<property name="pane_size"></property>
@@ -518,22 +508,12 @@
518508
<property name="window_extra_style"></property>
519509
<property name="window_name"></property>
520510
<property name="window_style"></property>
521-
<event name="OnButtonClick">OnRemoveNetclassClick</event>
522-
</object>
523-
</object>
524-
<object class="sizeritem" expanded="true">
525-
<property name="border">5</property>
526-
<property name="flag">wxEXPAND</property>
527-
<property name="proportion">0</property>
528-
<object class="spacer" expanded="true">
529-
<property name="height">0</property>
530-
<property name="permission">protected</property>
531-
<property name="width">20</property>
511+
<event name="OnButtonClick">OnMoveNetclassUpClick</event>
532512
</object>
533513
</object>
534514
<object class="sizeritem" expanded="true">
535515
<property name="border">5</property>
536-
<property name="flag">wxBOTTOM|wxLEFT</property>
516+
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
537517
<property name="proportion">0</property>
538518
<object class="wxBitmapButton" expanded="true">
539519
<property name="BottomDockable">1</property>
@@ -580,7 +560,7 @@
580560
<property name="minimize_button">0</property>
581561
<property name="minimum_size">-1,-1</property>
582562
<property name="moveable">1</property>
583-
<property name="name">m_moveUpButton</property>
563+
<property name="name">m_moveDownButton</property>
584564
<property name="pane_border">1</property>
585565
<property name="pane_position"></property>
586566
<property name="pane_size"></property>
@@ -603,7 +583,7 @@
603583
<property name="window_extra_style"></property>
604584
<property name="window_name"></property>
605585
<property name="window_style"></property>
606-
<event name="OnButtonClick">OnMoveNetclassUpClick</event>
586+
<event name="OnButtonClick">OnMoveNetclassDownClick</event>
607587
</object>
608588
</object>
609589
<object class="sizeritem" expanded="true">
@@ -616,11 +596,11 @@
616596
<property name="width">20</property>
617597
</object>
618598
</object>
619-
<object class="sizeritem" expanded="true">
599+
<object class="sizeritem" expanded="false">
620600
<property name="border">5</property>
621-
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
601+
<property name="flag">wxBOTTOM|wxLEFT</property>
622602
<property name="proportion">0</property>
623-
<object class="wxBitmapButton" expanded="true">
603+
<object class="wxBitmapButton" expanded="false">
624604
<property name="BottomDockable">1</property>
625605
<property name="LeftDockable">1</property>
626606
<property name="RightDockable">1</property>
@@ -665,7 +645,7 @@
665645
<property name="minimize_button">0</property>
666646
<property name="minimum_size">-1,-1</property>
667647
<property name="moveable">1</property>
668-
<property name="name">m_moveDownButton</property>
648+
<property name="name">m_removeButton</property>
669649
<property name="pane_border">1</property>
670650
<property name="pane_position"></property>
671651
<property name="pane_size"></property>
@@ -688,7 +668,7 @@
688668
<property name="window_extra_style"></property>
689669
<property name="window_name"></property>
690670
<property name="window_style"></property>
691-
<event name="OnButtonClick">OnMoveNetclassDownClick</event>
671+
<event name="OnButtonClick">OnRemoveNetclassClick</event>
692672
</object>
693673
</object>
694674
<object class="sizeritem" expanded="true">
@@ -698,7 +678,7 @@
698678
<object class="spacer" expanded="true">
699679
<property name="height">0</property>
700680
<property name="permission">protected</property>
701-
<property name="width">60</property>
681+
<property name="width">40</property>
702682
</object>
703683
</object>
704684
<object class="sizeritem" expanded="true">

common/dialogs/panel_setup_netclasses_base.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ class PANEL_SETUP_NETCLASSES_BASE : public wxPanel
4747
wxStaticText* m_staticText3;
4848
WX_GRID* m_netclassGrid;
4949
STD_BITMAP_BUTTON* m_addButton;
50-
STD_BITMAP_BUTTON* m_removeButton;
5150
STD_BITMAP_BUTTON* m_moveUpButton;
5251
STD_BITMAP_BUTTON* m_moveDownButton;
52+
STD_BITMAP_BUTTON* m_removeButton;
5353
wxStaticText* m_colorDefaultHelpText;
5454
wxButton* m_importColorsButton;
5555
WX_PANEL* m_membershipPane;
@@ -63,9 +63,9 @@ class PANEL_SETUP_NETCLASSES_BASE : public wxPanel
6363
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
6464
virtual void OnSizeNetclassGrid( wxSizeEvent& event ) { event.Skip(); }
6565
virtual void OnAddNetclassClick( wxCommandEvent& event ) { event.Skip(); }
66-
virtual void OnRemoveNetclassClick( wxCommandEvent& event ) { event.Skip(); }
6766
virtual void OnMoveNetclassUpClick( wxCommandEvent& event ) { event.Skip(); }
6867
virtual void OnMoveNetclassDownClick( wxCommandEvent& event ) { event.Skip(); }
68+
virtual void OnRemoveNetclassClick( wxCommandEvent& event ) { event.Skip(); }
6969
virtual void OnImportColorsClick( wxCommandEvent& event ) { event.Skip(); }
7070
virtual void onmembershipPanelSize( wxSizeEvent& event ) { event.Skip(); }
7171
virtual void OnSizeAssignmentGrid( wxSizeEvent& event ) { event.Skip(); }

common/widgets/lib_tree.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, const wxString& aRecentSearchesKey, LIB_T
8787

8888
m_debounceTimer = new wxTimer( this );
8989

90-
search_sizer->Add( m_query_ctrl, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
90+
search_sizer->Add( m_query_ctrl, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
9191

9292
wxStaticLine* separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
9393
search_sizer->Add( separator, 0, wxEXPAND|wxTOP|wxBOTTOM, 3 );
@@ -136,7 +136,7 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, const wxString& aRecentSearchesKey, LIB_T
136136
} );
137137

138138
m_sort_ctrl->Bind( wxEVT_CHAR_HOOK, &LIB_TREE::onTreeCharHook, this );
139-
search_sizer->Add( m_sort_ctrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
139+
search_sizer->Add( m_sort_ctrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
140140

141141
sizer->Add( search_sizer, 0, wxEXPAND, 5 );
142142

common/widgets/ui_common.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ wxFont KIUI::GetInfoFont( wxWindow* aWindow )
159159
}
160160

161161

162+
wxFont KIUI::GetSmallInfoFont( wxWindow* aWindow )
163+
{
164+
return getGUIFont( aWindow, - 2 );
165+
}
166+
167+
162168
wxFont KIUI::GetControlFont( wxWindow* aWindow )
163169
{
164170
return getGUIFont( aWindow, 0 );

eeschema/dialogs/dialog_field_properties.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,6 @@ DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent, const
238238
if( aField->GetId() == FIELD_T::SHEET_FILENAME )
239239
{
240240
m_isSheetFilename = true;
241-
m_note->SetLabel( wxString::Format( m_note->GetLabel(),
242-
_( "Sheet filename can only be modified in Sheet "
243-
"Properties dialog." ) ) );
244241
m_note->Show( true );
245242
}
246243

eeschema/dialogs/dialog_field_properties_base.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////////
2-
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
2+
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
33
// http://www.wxformbuilder.org/
44
//
55
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -84,9 +84,9 @@ DIALOG_FIELD_PROPERTIES_BASE::DIALOG_FIELD_PROPERTIES_BASE( wxWindow* parent, wx
8484

8585
bUpperBoxSizer->Add( bTextValueBoxSizer, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
8686

87-
m_note = new wxStaticText( this, wxID_ANY, _("(%s)"), wxDefaultPosition, wxDefaultSize, 0 );
87+
m_note = new wxStaticText( this, wxID_ANY, _("Sheet filename can only be modified in Sheet Properties dialog."), wxDefaultPosition, wxDefaultSize, 0 );
8888
m_note->Wrap( -1 );
89-
bUpperBoxSizer->Add( m_note, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 );
89+
bUpperBoxSizer->Add( m_note, 0, wxBOTTOM|wxRIGHT|wxLEFT, 20 );
9090

9191

9292
bPropertiesSizer->Add( bUpperBoxSizer, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );

0 commit comments

Comments
 (0)