Don't leave space for auto rotate checkbox when its hidden.

This commit is contained in:
Jeff Young 2022-09-01 14:26:32 +01:00
parent 09773e3e2e
commit ec414c88a2
4 changed files with 17 additions and 15 deletions

View File

@ -185,6 +185,14 @@ DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_L
m_spin3->SetBitmap( KiBitmap( BITMAPS::text_align_top ) ); m_spin3->SetBitmap( KiBitmap( BITMAPS::text_align_top ) );
} }
if( !m_currentLabel->AutoRotateOnPlacementSupported() )
{
m_autoRotate->Hide();
wxSizer* parentSizer = m_autoRotate->GetContainingSizer();
parentSizer->Detach( m_autoRotate );
parentSizer->Layout();
}
SetupStandardButtons(); SetupStandardButtons();
// DIALOG_SHIM needs a unique hash_key because classname is not sufficient because the // DIALOG_SHIM needs a unique hash_key because classname is not sufficient because the
@ -319,14 +327,7 @@ bool DIALOG_LABEL_PROPERTIES::TransferDataToWindow()
} }
if( m_currentLabel->AutoRotateOnPlacementSupported() ) if( m_currentLabel->AutoRotateOnPlacementSupported() )
{
m_autoRotate->Show();
m_autoRotate->SetValue( m_currentLabel->AutoRotateOnPlacement() ); m_autoRotate->SetValue( m_currentLabel->AutoRotateOnPlacement() );
}
else
{
m_autoRotate->Hide();
}
return true; return true;
} }

View File

@ -70,15 +70,15 @@ DIALOG_LABEL_PROPERTIES_BASE::DIALOG_LABEL_PROPERTIES_BASE( wxWindow* parent, wx
m_grid->SetColSize( 0, 72 ); m_grid->SetColSize( 0, 72 );
m_grid->SetColSize( 1, 84 ); m_grid->SetColSize( 1, 84 );
m_grid->SetColSize( 2, 48 ); m_grid->SetColSize( 2, 48 );
m_grid->SetColSize( 3, 72 ); m_grid->SetColSize( 3, 70 );
m_grid->SetColSize( 4, 72 ); m_grid->SetColSize( 4, 70 );
m_grid->SetColSize( 5, 48 ); m_grid->SetColSize( 5, 48 );
m_grid->SetColSize( 6, 48 ); m_grid->SetColSize( 6, 48 );
m_grid->SetColSize( 7, 84 ); m_grid->SetColSize( 7, 80 );
m_grid->SetColSize( 8, 48 ); m_grid->SetColSize( 8, 48 );
m_grid->SetColSize( 9, 84 ); m_grid->SetColSize( 9, 80 );
m_grid->SetColSize( 10, 84 ); m_grid->SetColSize( 10, 80 );
m_grid->SetColSize( 11, 140 ); m_grid->SetColSize( 11, 100 );
m_grid->SetColSize( 12, 48 ); m_grid->SetColSize( 12, 48 );
m_grid->EnableDragColMove( false ); m_grid->EnableDragColMove( false );
m_grid->EnableDragColSize( true ); m_grid->EnableDragColSize( true );
@ -95,6 +95,7 @@ DIALOG_LABEL_PROPERTIES_BASE::DIALOG_LABEL_PROPERTIES_BASE( wxWindow* parent, wx
m_grid->SetColLabelValue( 10, _("Y Position") ); m_grid->SetColLabelValue( 10, _("Y Position") );
m_grid->SetColLabelValue( 11, _("Font") ); m_grid->SetColLabelValue( 11, _("Font") );
m_grid->SetColLabelValue( 12, _("Color") ); m_grid->SetColLabelValue( 12, _("Color") );
m_grid->SetColLabelSize( 22 );
m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows // Rows

View File

@ -452,7 +452,7 @@
<property name="col_label_values">&quot;Name&quot; &quot;Value&quot; &quot;Show&quot; &quot;H Align&quot; &quot;V Align&quot; &quot;Italic&quot; &quot;Bold&quot; &quot;Text Size&quot; &quot;Orientation&quot; &quot;X Position&quot; &quot;Y Position&quot; &quot;Font&quot; &quot;Color&quot;</property> <property name="col_label_values">&quot;Name&quot; &quot;Value&quot; &quot;Show&quot; &quot;H Align&quot; &quot;V Align&quot; &quot;Italic&quot; &quot;Bold&quot; &quot;Text Size&quot; &quot;Orientation&quot; &quot;X Position&quot; &quot;Y Position&quot; &quot;Font&quot; &quot;Color&quot;</property>
<property name="col_label_vert_alignment">wxALIGN_CENTER</property> <property name="col_label_vert_alignment">wxALIGN_CENTER</property>
<property name="cols">13</property> <property name="cols">13</property>
<property name="column_sizes">72,84,48,72,72,48,48,84,48,84,84,140,48</property> <property name="column_sizes">72,84,48,70,70,48,48,80,48,80,80,100,48</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default_pane">0</property> <property name="default_pane">0</property>

View File

@ -35,8 +35,8 @@ class WX_GRID;
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/radiobut.h> #include <wx/radiobut.h>
#include <wx/choice.h> #include <wx/choice.h>
#include <wx/panel.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/panel.h>
#include <wx/gbsizer.h> #include <wx/gbsizer.h>
#include <wx/dialog.h> #include <wx/dialog.h>