Add colors-overridden warning to Symbol Editor's shape properties dialog.
(Note: could be cherry-picked as the strings are all from the schematic editor.)
This commit is contained in:
parent
cc0facdd4e
commit
f2c6f25967
|
@ -40,7 +40,8 @@ DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES( SYMBOL_EDIT_FRAME* aPa
|
||||||
{
|
{
|
||||||
wxASSERT( aShape );
|
wxASSERT( aShape );
|
||||||
|
|
||||||
SetTitle( m_shape->GetTypeName() + wxT( " " ) + GetTitle() );
|
SetTitle( wxString::Format( GetTitle(), aShape->EDA_SHAPE::GetFriendlyName() ) );
|
||||||
|
|
||||||
m_helpLabel->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
m_helpLabel->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||||
|
|
||||||
COLOR_SETTINGS* colorSettings = m_frame->GetColorSettings();
|
COLOR_SETTINGS* colorSettings = m_frame->GetColorSettings();
|
||||||
|
@ -59,6 +60,9 @@ DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES( SYMBOL_EDIT_FRAME* aPa
|
||||||
|
|
||||||
m_helpLabel->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
m_helpLabel->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||||
|
|
||||||
|
if( m_frame->GetColorSettings()->GetOverrideSchItemColors() )
|
||||||
|
m_infoBar->ShowMessage( _( "Note: individual item colors overridden in Preferences." ) );
|
||||||
|
|
||||||
SetInitialFocus( m_borderWidthCtrl );
|
SetInitialFocus( m_borderWidthCtrl );
|
||||||
|
|
||||||
// Required under wxGTK if we want to dismiss the dialog with the ESC key
|
// Required under wxGTK if we want to dismiss the dialog with the ESC key
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "widgets/color_swatch.h"
|
#include "widgets/color_swatch.h"
|
||||||
|
#include "widgets/wx_infobar.h"
|
||||||
|
|
||||||
#include "dialog_lib_shape_properties_base.h"
|
#include "dialog_lib_shape_properties_base.h"
|
||||||
|
|
||||||
|
@ -26,6 +27,13 @@ DIALOG_LIB_SHAPE_PROPERTIES_BASE::DIALOG_LIB_SHAPE_PROPERTIES_BASE( wxWindow* pa
|
||||||
wxBoxSizer* mainSizer;
|
wxBoxSizer* mainSizer;
|
||||||
mainSizer = new wxBoxSizer( wxVERTICAL );
|
mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_infoBar = new WX_INFOBAR( this );
|
||||||
|
m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
|
||||||
|
m_infoBar->SetEffectDuration( 500 );
|
||||||
|
m_infoBar->Hide();
|
||||||
|
|
||||||
|
mainSizer->Add( m_infoBar, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bTop;
|
wxBoxSizer* bTop;
|
||||||
bTop = new wxBoxSizer( wxHORIZONTAL );
|
bTop = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<property name="size">-1,-1</property>
|
<property name="size">-1,-1</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
<property name="title">Drawing Properties</property>
|
<property name="title">%s Properties</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="two_step_creation">0</property>
|
<property name="two_step_creation">0</property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
|
@ -61,6 +61,66 @@
|
||||||
<property name="name">mainSizer</property>
|
<property name="name">mainSizer</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxInfoBar" 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="duration">500</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">1</property>
|
||||||
|
<property name="hide_effect">wxSHOW_EFFECT_NONE</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_infoBar</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="show_effect">wxSHOW_EFFECT_NONE</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="subclass">WX_INFOBAR; widgets/wx_infobar.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 class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">10</property>
|
<property name="border">10</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
|
|
|
@ -11,14 +11,16 @@
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
class COLOR_SWATCH;
|
class COLOR_SWATCH;
|
||||||
|
class WX_INFOBAR;
|
||||||
|
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
#include <wx/string.h>
|
#include <wx/infobar.h>
|
||||||
#include <wx/checkbox.h>
|
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
@ -54,6 +56,7 @@ class DIALOG_LIB_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
|
||||||
FILLED_WITH_COLOR
|
FILLED_WITH_COLOR
|
||||||
};
|
};
|
||||||
|
|
||||||
|
WX_INFOBAR* m_infoBar;
|
||||||
wxCheckBox* m_checkBorder;
|
wxCheckBox* m_checkBorder;
|
||||||
wxStaticText* m_borderWidthLabel;
|
wxStaticText* m_borderWidthLabel;
|
||||||
wxTextCtrl* m_borderWidthCtrl;
|
wxTextCtrl* m_borderWidthCtrl;
|
||||||
|
@ -83,7 +86,7 @@ class DIALOG_LIB_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_LIB_SHAPE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drawing Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_LIB_SHAPE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("%s Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
|
||||||
~DIALOG_LIB_SHAPE_PROPERTIES_BASE();
|
~DIALOG_LIB_SHAPE_PROPERTIES_BASE();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue