From d3dc56a42f590f8eb29a2c78bce8c70812733caf Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 2 Nov 2018 13:47:48 +0100 Subject: [PATCH] pl_editor: cosmetic enhancements --- .../dialogs/properties_frame_base.cpp | 24 ++- .../dialogs/properties_frame_base.fbp | 197 +++++++++++++++++- .../dialogs/properties_frame_base.h | 4 +- 3 files changed, 208 insertions(+), 17 deletions(-) diff --git a/pagelayout_editor/dialogs/properties_frame_base.cpp b/pagelayout_editor/dialogs/properties_frame_base.cpp index d19d5f4d46..f6db8b8fef 100644 --- a/pagelayout_editor/dialogs/properties_frame_base.cpp +++ b/pagelayout_editor/dialogs/properties_frame_base.cpp @@ -111,6 +111,13 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c m_SizerTextOptions->Add( bSizerFontOpt, 0, wxEXPAND, 5 ); + m_staticline81 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + m_SizerTextOptions->Add( m_staticline81, 0, wxEXPAND | wxALL, 5 ); + + m_staticTextSizeInfo = new wxStaticText( m_swItemProperties, wxID_ANY, _("Set to 0 to use default values"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSizeInfo->Wrap( -1 ); + m_SizerTextOptions->Add( m_staticTextSizeInfo, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + wxFlexGridSizer* fgSizer2; fgSizer2 = new wxFlexGridSizer( 0, 4, 0, 0 ); fgSizer2->AddGrowableCol( 0 ); @@ -120,14 +127,14 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c m_staticTexTsizeX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTexTsizeX->Wrap( -1 ); - fgSizer2->Add( m_staticTexTsizeX, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + fgSizer2->Add( m_staticTexTsizeX, 0, wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticTextTsizeY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTsizeY->Wrap( -1 ); - fgSizer2->Add( m_staticTextTsizeY, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + fgSizer2->Add( m_staticTextTsizeY, 0, wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); @@ -137,7 +144,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c m_units1 = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_units1->Wrap( -1 ); - fgSizer2->Add( m_units1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxRIGHT, 5 ); + fgSizer2->Add( m_units1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM, 5 ); m_textCtrlTextSizeY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer2->Add( m_textCtrlTextSizeY, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); @@ -161,14 +168,18 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c m_staticTextConstraintX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Maximum width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextConstraintX->Wrap( -1 ); - fgSizer2->Add( m_staticTextConstraintX, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticTextConstraintX->SetToolTip( _("Set to 0 to disable this constraint") ); + + fgSizer2->Add( m_staticTextConstraintX, 0, wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticTextConstraintY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Maximum height:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextConstraintY->Wrap( -1 ); - fgSizer2->Add( m_staticTextConstraintY, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + m_staticTextConstraintY->SetToolTip( _("Set to 0 to disable this constraint") ); + + fgSizer2->Add( m_staticTextConstraintY, 0, wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); @@ -178,7 +189,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c m_units111 = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_units111->Wrap( -1 ); - fgSizer2->Add( m_units111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxRIGHT, 5 ); + fgSizer2->Add( m_units111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM, 5 ); m_textCtrlConstraintY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer2->Add( m_textCtrlConstraintY, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); @@ -645,7 +656,6 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c this->SetSizer( bSizerpanel ); this->Layout(); - bSizerpanel->Fit( this ); // Connect Events m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this ); diff --git a/pagelayout_editor/dialogs/properties_frame_base.fbp b/pagelayout_editor/dialogs/properties_frame_base.fbp index a0805c9ed7..5d6a367773 100644 --- a/pagelayout_editor/dialogs/properties_frame_base.fbp +++ b/pagelayout_editor/dialogs/properties_frame_base.fbp @@ -43,7 +43,7 @@ PANEL_PROPERTIES_BASE - -1,-1 + 371,864 @@ -1557,6 +1557,185 @@ + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline81 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; forward_declare + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Set to 0 to use default values + 0 + + 0 + + + 0 + + 1 + m_staticTextSizeInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxEXPAND @@ -1575,7 +1754,7 @@ 0 5 - wxTOP|wxRIGHT|wxLEFT + wxRIGHT|wxLEFT 0 1 @@ -1676,7 +1855,7 @@ 5 - wxTOP|wxRIGHT|wxLEFT + wxRIGHT|wxLEFT 0 1 @@ -1875,7 +2054,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM 0 1 @@ -2276,7 +2455,7 @@ 5 - wxTOP|wxRIGHT|wxLEFT + wxRIGHT|wxLEFT 0 1 @@ -2328,7 +2507,7 @@ 0 - + Set to 0 to disable this constraint @@ -2377,7 +2556,7 @@ 5 - wxLEFT|wxRIGHT|wxTOP + wxRIGHT|wxLEFT 0 1 @@ -2429,7 +2608,7 @@ 0 - + Set to 0 to disable this constraint @@ -2576,7 +2755,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM 0 1 diff --git a/pagelayout_editor/dialogs/properties_frame_base.h b/pagelayout_editor/dialogs/properties_frame_base.h index 14ab8aa26d..39282a0cc9 100644 --- a/pagelayout_editor/dialogs/properties_frame_base.h +++ b/pagelayout_editor/dialogs/properties_frame_base.h @@ -57,6 +57,8 @@ class PANEL_PROPERTIES_BASE : public wxPanel wxStaticText* m_staticTextVjust; wxChoice* m_choiceVjustify; wxCheckBox* m_checkBoxItalic; + wxStaticLine* m_staticline81; + wxStaticText* m_staticTextSizeInfo; wxStaticText* m_staticTexTsizeX; wxStaticText* m_staticTextTsizeY; wxTextCtrl* m_textCtrlTextSizeX; @@ -153,7 +155,7 @@ class PANEL_PROPERTIES_BASE : public wxPanel public: - PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 371,864 ), long style = wxTAB_TRAVERSAL ); ~PANEL_PROPERTIES_BASE(); };