Commit 4e94d8e7 authored by jean-pierre charras's avatar jean-pierre charras

Dialog page setting: replace wxStaticBoxSizer by wxBoxSizer + static text,

because under Linux and wxWidgets 2.9, wxStaticBoxSizer are very ugly (text not readable in this dialog)
(Does not happen with wxWidgets 2.8)
Eeschema hotkeys: remove duplicate keys in key editor.
parent 2043001b
...@@ -606,7 +606,7 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample() ...@@ -606,7 +606,7 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
double scaleH = (double) lyHeight / clamped_layout_size.y / appScale; double scaleH = (double) lyHeight / clamped_layout_size.y / appScale;
// Prepare DC. // Prepare DC.
wxSize example_size( lyWidth, lyHeight ); wxSize example_size( lyWidth + 1, lyHeight + 1 );
wxMemoryDC memDC; wxMemoryDC memDC;
memDC.SelectObject( *m_page_bitmap ); memDC.SelectObject( *m_page_bitmap );
memDC.SetClippingRegion( wxPoint( 0, 0 ), example_size ); memDC.SetClippingRegion( wxPoint( 0, 0 ), example_size );
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -20,6 +20,7 @@ class DIALOG_SHIM; ...@@ -20,6 +20,7 @@ class DIALOG_SHIM;
#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/statline.h>
#include <wx/choice.h> #include <wx/choice.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/sizer.h> #include <wx/sizer.h>
...@@ -28,12 +29,10 @@ class DIALOG_SHIM; ...@@ -28,12 +29,10 @@ class DIALOG_SHIM;
#include <wx/image.h> #include <wx/image.h>
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/statbmp.h> #include <wx/statbmp.h>
#include <wx/statline.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/datectrl.h> #include <wx/datectrl.h>
#include <wx/dateevt.h> #include <wx/dateevt.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/statbox.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
...@@ -69,6 +68,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM ...@@ -69,6 +68,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
protected: protected:
wxStaticText* m_staticTextPaper; wxStaticText* m_staticTextPaper;
wxStaticLine* m_staticline2;
wxStaticText* m_staticTextSize; wxStaticText* m_staticTextSize;
wxChoice* m_paperSizeComboBox; wxChoice* m_paperSizeComboBox;
wxStaticText* m_staticTextOrient; wxStaticText* m_staticTextOrient;
...@@ -82,8 +82,10 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM ...@@ -82,8 +82,10 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
wxStaticBitmap* m_PageLayoutExampleBitmap; wxStaticBitmap* m_PageLayoutExampleBitmap;
wxStaticLine* m_staticline1; wxStaticLine* m_staticline1;
wxStaticText* m_staticTexttbprm; wxStaticText* m_staticTexttbprm;
wxStaticLine* m_staticline3;
wxStaticText* m_TextSheetCount; wxStaticText* m_TextSheetCount;
wxStaticText* m_TextSheetNumber; wxStaticText* m_TextSheetNumber;
wxStaticText* m_staticTextDate;
wxTextCtrl* m_TextDate; wxTextCtrl* m_TextDate;
wxButton* m_ApplyDate; wxButton* m_ApplyDate;
wxDatePickerCtrl* m_PickDate; wxDatePickerCtrl* m_PickDate;
...@@ -91,16 +93,22 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM ...@@ -91,16 +93,22 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
wxStaticText* m_staticTextRev; wxStaticText* m_staticTextRev;
wxTextCtrl* m_TextRevision; wxTextCtrl* m_TextRevision;
wxCheckBox* m_RevisionExport; wxCheckBox* m_RevisionExport;
wxStaticText* m_staticTextTitle;
wxTextCtrl* m_TextTitle; wxTextCtrl* m_TextTitle;
wxCheckBox* m_TitleExport; wxCheckBox* m_TitleExport;
wxStaticText* m_staticText13;
wxTextCtrl* m_TextCompany; wxTextCtrl* m_TextCompany;
wxCheckBox* m_CompanyExport; wxCheckBox* m_CompanyExport;
wxStaticText* m_staticTextComment1;
wxTextCtrl* m_TextComment1; wxTextCtrl* m_TextComment1;
wxCheckBox* m_Comment1Export; wxCheckBox* m_Comment1Export;
wxStaticText* m_staticTextComment2;
wxTextCtrl* m_TextComment2; wxTextCtrl* m_TextComment2;
wxCheckBox* m_Comment2Export; wxCheckBox* m_Comment2Export;
wxStaticText* m_staticTextComment3;
wxTextCtrl* m_TextComment3; wxTextCtrl* m_TextComment3;
wxCheckBox* m_Comment3Export; wxCheckBox* m_Comment3Export;
wxStaticText* m_staticTextComment4;
wxTextCtrl* m_TextComment4; wxTextCtrl* m_TextComment4;
wxCheckBox* m_Comment4Export; wxCheckBox* m_Comment4Export;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
...@@ -129,7 +137,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM ...@@ -129,7 +137,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
public: public:
DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Page Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 748,495 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Page Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 748,464 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PAGES_SETTINGS_BASE(); ~DIALOG_PAGES_SETTINGS_BASE();
}; };
......
...@@ -164,7 +164,7 @@ static EDA_HOTKEY HkMirrorX( wxT( "Mirror X Component" ), HK_MIRROR_X_COMPONENT, ...@@ -164,7 +164,7 @@ static EDA_HOTKEY HkMirrorX( wxT( "Mirror X Component" ), HK_MIRROR_X_COMPONENT,
static EDA_HOTKEY HkOrientNormalComponent( wxT( "Orient Normal Component" ), static EDA_HOTKEY HkOrientNormalComponent( wxT( "Orient Normal Component" ),
HK_ORIENT_NORMAL_COMPONENT, 'N', ID_SCH_ORIENT_NORMAL ); HK_ORIENT_NORMAL_COMPONENT, 'N', ID_SCH_ORIENT_NORMAL );
static EDA_HOTKEY HkRotate( wxT( "Rotate Item" ), HK_ROTATE, 'R', ID_SCH_ROTATE_CLOCKWISE ); static EDA_HOTKEY HkRotate( wxT( "Rotate Item" ), HK_ROTATE, 'R', ID_SCH_ROTATE_CLOCKWISE );
static EDA_HOTKEY HkEdit( wxT( "Edit Schematic Item" ), HK_EDIT, 'E', ID_SCH_EDIT_ITEM ); static EDA_HOTKEY HkEdit( wxT( "Edit Item" ), HK_EDIT, 'E', ID_SCH_EDIT_ITEM );
static EDA_HOTKEY HkEditComponentValue( wxT( "Edit Component Value" ), static EDA_HOTKEY HkEditComponentValue( wxT( "Edit Component Value" ),
HK_EDIT_COMPONENT_VALUE, 'V', HK_EDIT_COMPONENT_VALUE, 'V',
ID_SCH_EDIT_COMPONENT_VALUE ); ID_SCH_EDIT_COMPONENT_VALUE );
...@@ -182,7 +182,7 @@ static EDA_HOTKEY HkCopyComponentOrText( wxT( "Copy Component or Label" ), ...@@ -182,7 +182,7 @@ static EDA_HOTKEY HkCopyComponentOrText( wxT( "Copy Component or Label" ),
HK_COPY_COMPONENT_OR_LABEL, 'C', HK_COPY_COMPONENT_OR_LABEL, 'C',
ID_POPUP_SCH_COPY_ITEM ); ID_POPUP_SCH_COPY_ITEM );
static EDA_HOTKEY HkDrag( wxT( "Drag Schematic Item" ), HK_DRAG, 'G', ID_SCH_DRAG_ITEM ); static EDA_HOTKEY HkDrag( wxT( "Drag Item" ), HK_DRAG, 'G', ID_SCH_DRAG_ITEM );
static EDA_HOTKEY HkSaveBlock( wxT( "Save Block" ), HK_SAVE_BLOCK, 'C' + GR_KB_CTRL ); static EDA_HOTKEY HkSaveBlock( wxT( "Save Block" ), HK_SAVE_BLOCK, 'C' + GR_KB_CTRL );
static EDA_HOTKEY HkMove2Drag( wxT( "Move Block -> Drag Block" ), static EDA_HOTKEY HkMove2Drag( wxT( "Move Block -> Drag Block" ),
HK_MOVEBLOCK_TO_DRAGBLOCK, '\t' ); HK_MOVEBLOCK_TO_DRAGBLOCK, '\t' );
...@@ -215,6 +215,10 @@ EDA_HOTKEY* s_Common_Hotkey_List[] = ...@@ -215,6 +215,10 @@ EDA_HOTKEY* s_Common_Hotkey_List[] =
&HkZoomCenter, &HkZoomCenter,
&HkZoomAuto, &HkZoomAuto,
&HkResetLocalCoord, &HkResetLocalCoord,
&HkEdit,
&HkDelete,
&HkRotate,
&HkDrag,
&HkUndo, &HkUndo,
&HkRedo, &HkRedo,
NULL NULL
...@@ -228,20 +232,16 @@ EDA_HOTKEY* s_Schematic_Hotkey_List[] = ...@@ -228,20 +232,16 @@ EDA_HOTKEY* s_Schematic_Hotkey_List[] =
&HkFindItem, &HkFindItem,
&HkFindNextItem, &HkFindNextItem,
&HkFindNextDrcMarker, &HkFindNextDrcMarker,
&HkDelete,
&HkInsert, &HkInsert,
&HkMove2Drag, &HkMove2Drag,
&HkSaveBlock, &HkSaveBlock,
&HkMove, &HkMove,
&HkCopyComponentOrText, &HkCopyComponentOrText,
&HkDrag,
&HkAddComponent, &HkAddComponent,
&HkAddPower, &HkAddPower,
&HkRotate,
&HkMirrorX, &HkMirrorX,
&HkMirrorY, &HkMirrorY,
&HkOrientNormalComponent, &HkOrientNormalComponent,
&HkEdit,
&HkEditComponentValue, &HkEditComponentValue,
&HkEditComponentReference, &HkEditComponentReference,
&HkEditComponentFootprint, &HkEditComponentFootprint,
...@@ -267,11 +267,7 @@ EDA_HOTKEY* s_LibEdit_Hotkey_List[] = ...@@ -267,11 +267,7 @@ EDA_HOTKEY* s_LibEdit_Hotkey_List[] =
&HkSaveLib, &HkSaveLib,
&HkCreatePin, &HkCreatePin,
&HkInsertPin, &HkInsertPin,
&HkEdit,
&HkMoveLibItem, &HkMoveLibItem,
&HkDelete,
&HkRotate,
&HkDrag,
NULL NULL
}; };
...@@ -579,17 +575,10 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, ...@@ -579,17 +575,10 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
break; break;
case HK_UNDO: case HK_UNDO:
if( !itemInEdit )
{
cmd.SetId( wxID_UNDO );
GetEventHandler()->ProcessEvent( cmd );
}
break;
case HK_REDO: case HK_REDO:
if( !itemInEdit ) if( !itemInEdit )
{ {
cmd.SetId( wxID_REDO ); cmd.SetId( hotKey->m_IdMenuEvent );
GetEventHandler()->ProcessEvent( cmd ); GetEventHandler()->ProcessEvent( cmd );
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment