simulator: DPI-independent default size

This commit is contained in:
Chris Pavlina 2018-01-06 22:23:58 -07:00
parent b1eed74b55
commit c5b2ad9595
4 changed files with 12 additions and 12 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2016 CERN * Copyright (C) 2016 CERN
* Copyright (C) 2016-2017 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2016-2018 KiCad Developers, see AUTHORS.txt for contributors.
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch> * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* @author Maciej Suminski <maciej.suminski@cern.ch> * @author Maciej Suminski <maciej.suminski@cern.ch>
* *
@ -191,6 +191,8 @@ SIM_PLOT_FRAME::SIM_PLOT_FRAME( KIWAY* aKiway, wxWindow* aParent )
// instead of being behind the dialog frame (as it does) // instead of being behind the dialog frame (as it does)
m_settingsDlg = NULL; m_settingsDlg = NULL;
SetSize( ConvertDialogToPixels( wxSize( 400, 300 ) ) );
// resize the subwindows size. At least on Windows, calling wxSafeYield before // resize the subwindows size. At least on Windows, calling wxSafeYield before
// resizing the subwindows forces the wxSplitWindows size events automatically generated // resizing the subwindows forces the wxSplitWindows size events automatically generated
// by wxWidgets to be executed before our resize code. // by wxWidgets to be executed before our resize code.

View File

@ -1,8 +1,8 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2016) // C++ code generated with wxFormBuilder (version Jan 2 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "sim_plot_frame_base.h" #include "sim_plot_frame_base.h"
@ -11,7 +11,7 @@
SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name ) SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
{ {
this->SetSizeHints( wxSize( 600,500 ), wxDefaultSize ); this->SetSizeHints( wxSize( 200,200 ), wxDefaultSize );
m_mainMenu = new wxMenuBar( 0 ); m_mainMenu = new wxMenuBar( 0 );
m_fileMenu = new wxMenu(); m_fileMenu = new wxMenu();
@ -266,6 +266,7 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const
this->SetSizer( m_sizerMain ); this->SetSizer( m_sizerMain );
this->Layout(); this->Layout();
m_sizerMain->Fit( this );
this->Centre( wxBOTH ); this->Centre( wxBOTH );

View File

@ -41,10 +41,10 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size">600,500</property> <property name="minimum_size">200,200</property>
<property name="name">SIM_PLOT_FRAME_BASE</property> <property name="name">SIM_PLOT_FRAME_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">883,594</property> <property name="size">-1,-1</property>
<property name="style">wxDEFAULT_FRAME_STYLE</property> <property name="style">wxDEFAULT_FRAME_STYLE</property>
<property name="subclass">KIWAY_PLAYER; kiway_player.h</property> <property name="subclass">KIWAY_PLAYER; kiway_player.h</property>
<property name="title">Spice Simulator</property> <property name="title">Spice Simulator</property>

View File

@ -1,8 +1,8 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2016) // C++ code generated with wxFormBuilder (version Jan 2 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __SIM_PLOT_FRAME_BASE_H__ #ifndef __SIM_PLOT_FRAME_BASE_H__
@ -11,9 +11,6 @@
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
class KIWAY_PLAYER;
class wxListView;
#include "kiway_player.h" #include "kiway_player.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
@ -105,7 +102,7 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER
public: public:
SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Spice Simulator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 883,594 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("SIM_PLOT_FRAME") ); SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Spice Simulator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("SIM_PLOT_FRAME") );
~SIM_PLOT_FRAME_BASE(); ~SIM_PLOT_FRAME_BASE();