Eeschema, Print preview: fix a incorrect initial size on wx 3.1.7 (and later)
Due to internal changes in wxWidgets, the initial size of the frame was not taken in account.
This commit is contained in:
parent
f3bb34779a
commit
aa36e15d66
|
@ -285,12 +285,6 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
|
|||
preview->SetZoom( 100 );
|
||||
|
||||
SCH_PREVIEW_FRAME* frame = new SCH_PREVIEW_FRAME( preview, this, title );
|
||||
frame->SetMinSize( wxSize( 550, 350 ) );
|
||||
|
||||
// on first invocation in this runtime session, set to 2/3 size of my parent,
|
||||
// but will be changed in Show() if not first time as will position.
|
||||
frame->SetSize( (m_parent->GetSize() * 2) / 3 );
|
||||
frame->Center();
|
||||
|
||||
// On wxGTK, set the flag wxTOPLEVEL_EX_DIALOG is mandatory, if we want
|
||||
// close the frame using the X box in caption, when the preview frame is run
|
||||
|
@ -305,6 +299,13 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
|
|||
// Reenabling all top level frames should be made by the parent dialog.
|
||||
frame->InitializeWithModality( wxPreviewFrame_WindowModal );
|
||||
|
||||
// on first invocation in this runtime session, set to 3/4 size of parent,
|
||||
// but will be changed in Show() if not first time as will position.
|
||||
// Must be called after InitializeWithModality because otherwise in some wxWidget
|
||||
// versions it is not always taken in account
|
||||
frame->SetMinSize( wxSize( 650, 500 ) );
|
||||
frame->SetSize( (m_parent->GetSize() * 3) / 4 );
|
||||
|
||||
frame->Raise(); // Needed on Ubuntu/Unity to display the frame
|
||||
frame->Show( true );
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="15" />
|
||||
<FileVersion major="1" minor="16" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
|
@ -14,6 +14,7 @@
|
|||
<property name="file">dialog_print_using_printer_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_print_schematic</property>
|
||||
|
@ -25,6 +26,7 @@
|
|||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -50,6 +52,7 @@
|
|||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Print</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="two_step_creation">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -483,6 +486,7 @@
|
|||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
|
|
Loading…
Reference in New Issue