Minor simplification to custom colour theme GUI for print/plot dialogs.
This commit is contained in:
parent
ebb9a636fa
commit
f005977aab
|
@ -197,7 +197,6 @@ bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow()
|
|||
|
||||
m_colorTheme->SetMinSize( wxSize( minwidth + 50, -1 ) );
|
||||
|
||||
m_lblTheme->Enable( cfg->m_Printing.use_theme );
|
||||
m_colorTheme->Enable( cfg->m_Printing.use_theme );
|
||||
|
||||
// Initialize page specific print setup dialog settings.
|
||||
|
@ -226,7 +225,6 @@ bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow()
|
|||
|
||||
void DIALOG_PRINT_USING_PRINTER::OnUseColorThemeChecked( wxCommandEvent& event )
|
||||
{
|
||||
m_lblTheme->Enable( m_checkUseColorTheme->GetValue() );
|
||||
m_colorTheme->Enable( m_checkUseColorTheme->GetValue() );
|
||||
}
|
||||
|
||||
|
|
|
@ -32,28 +32,23 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare
|
|||
m_checkBackgroundColor = new wxCheckBox( this, wxID_ANY, _("Print background color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bleftSizer->Add( m_checkBackgroundColor, 0, wxALL, 5 );
|
||||
|
||||
m_checkUseColorTheme = new wxCheckBox( this, wxID_ANY, _("Use a different color theme for printing"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkUseColorTheme = new wxCheckBox( this, wxID_ANY, _("Use a different color theme for printing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkUseColorTheme->SetValue(true);
|
||||
bleftSizer->Add( m_checkUseColorTheme, 0, wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bSizer4;
|
||||
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_lblTheme = new wxStaticText( this, wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lblTheme->Wrap( -1 );
|
||||
m_lblTheme->Enable( false );
|
||||
|
||||
bSizer4->Add( m_lblTheme, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
wxArrayString m_colorThemeChoices;
|
||||
m_colorTheme = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
|
||||
m_colorTheme->SetSelection( 0 );
|
||||
m_colorTheme->Enable( false );
|
||||
m_colorTheme->SetMinSize( wxSize( 200,-1 ) );
|
||||
|
||||
bSizer4->Add( m_colorTheme, 0, wxALL, 5 );
|
||||
bSizer4->Add( m_colorTheme, 0, wxLEFT, 25 );
|
||||
|
||||
|
||||
bleftSizer->Add( bSizer4, 1, wxEXPAND|wxLEFT, 5 );
|
||||
bleftSizer->Add( bSizer4, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bleftSizer, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 10 );
|
||||
|
|
|
@ -294,7 +294,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Use a different color theme for printing</property>
|
||||
<property name="label">Use a different color theme for printing:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -328,7 +328,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -336,69 +336,8 @@
|
|||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</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">0</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 theme:</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_lblTheme</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">; ; 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">wxALL</property>
|
||||
<property name="border">25</property>
|
||||
<property name="flag">wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -434,7 +373,7 @@
|
|||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="minimum_size">200,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_colorTheme</property>
|
||||
<property name="pane_border">1</property>
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statline.h>
|
||||
|
@ -41,7 +40,6 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public DIALOG_SHIM
|
|||
wxCheckBox* m_checkMonochrome;
|
||||
wxCheckBox* m_checkBackgroundColor;
|
||||
wxCheckBox* m_checkUseColorTheme;
|
||||
wxStaticText* m_lblTheme;
|
||||
wxChoice* m_colorTheme;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxButton* m_buttonPageSetup;
|
||||
|
|
|
@ -99,7 +99,6 @@ private:
|
|||
wxCheckBox* m_checkAsItems;
|
||||
wxCheckBox* m_checkBackground;
|
||||
wxCheckBox* m_checkUseTheme;
|
||||
wxStaticText* m_lblTheme;
|
||||
wxChoice* m_colorTheme;
|
||||
};
|
||||
|
||||
|
@ -209,26 +208,19 @@ void DIALOG_PRINT_PCBNEW::createExtraOptions()
|
|||
optionsSizer->Add( m_checkBackground, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ), wxALL, 5 );
|
||||
|
||||
m_checkUseTheme = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY,
|
||||
_( "Use a different color theme for printing" ),
|
||||
_( "Use a different color theme for printing:" ),
|
||||
wxDefaultPosition, wxDefaultSize, 0 );
|
||||
optionsSizer->Add( m_checkUseTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
|
||||
wxLEFT | wxRIGHT | wxTOP, 5 );
|
||||
optionsSizer->Add( m_checkUseTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ), wxALL, 5 );
|
||||
|
||||
m_checkUseTheme->Bind(
|
||||
wxEVT_COMMAND_CHECKBOX_CLICKED, &DIALOG_PRINT_PCBNEW::onUseThemeChecked, this );
|
||||
|
||||
m_lblTheme = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _( "Theme:" ),
|
||||
wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lblTheme->Wrap( -1 );
|
||||
optionsSizer->Add( m_lblTheme, wxGBPosition( rows, 0 ), wxGBSpan( 1, 1 ),
|
||||
wxALIGN_CENTER_VERTICAL | wxLEFT, 25 );
|
||||
m_checkUseTheme->Bind( wxEVT_COMMAND_CHECKBOX_CLICKED, &DIALOG_PRINT_PCBNEW::onUseThemeChecked, this );
|
||||
|
||||
wxArrayString m_colorThemeChoices;
|
||||
m_colorTheme = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition,
|
||||
wxDefaultSize, m_colorThemeChoices, 0 );
|
||||
m_colorTheme->SetSelection( 0 );
|
||||
optionsSizer->Add( m_colorTheme, wxGBPosition( rows++, 1 ), wxGBSpan( 1, 2 ),
|
||||
wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5 );
|
||||
|
||||
optionsSizer->Add( m_colorTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
|
||||
wxALIGN_CENTER_VERTICAL | wxLEFT, 25 );
|
||||
|
||||
// Drill marks option
|
||||
auto drillMarksLabel = new wxStaticText( box, wxID_ANY, _( "Drill marks:" ) );
|
||||
|
@ -338,7 +330,6 @@ void DIALOG_PRINT_PCBNEW::onDeselectAllClick( wxCommandEvent& event )
|
|||
|
||||
void DIALOG_PRINT_PCBNEW::onUseThemeChecked( wxCommandEvent& event )
|
||||
{
|
||||
m_lblTheme->Enable( m_checkUseTheme->GetValue() );
|
||||
m_colorTheme->Enable( m_checkUseTheme->GetValue() );
|
||||
}
|
||||
|
||||
|
@ -351,7 +342,6 @@ void DIALOG_PRINT_PCBNEW::onColorModeChanged( wxCommandEvent& event )
|
|||
|
||||
m_checkBackground->Enable( !m_settings->m_blackWhite );
|
||||
m_checkUseTheme->Enable( !m_settings->m_blackWhite );
|
||||
m_lblTheme->Enable( !m_settings->m_blackWhite && cfg->m_Printing.use_theme );
|
||||
m_colorTheme->Enable( !m_settings->m_blackWhite && cfg->m_Printing.use_theme );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue