bitmap2component: fix incorrect min size of the main frame.
It was due to the fact the sizers were set without menubar, created later. A dummy menubar is now added at frame creation, to allow sizers to be correctly initialized. Fixes #14859 https://gitlab.com/kicad/code/kicad/-/issues/14859
This commit is contained in:
parent
db3cf4274b
commit
707b0becee
|
@ -13,6 +13,12 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
|||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
m_menubar = new wxMenuBar( 0 );
|
||||
m_menu1 = new wxMenu();
|
||||
m_menubar->Append( m_menu1, _("dummy") );
|
||||
|
||||
this->SetMenuBar( m_menubar );
|
||||
|
||||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
|
|
@ -58,6 +58,34 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<property name="xrc_skip_sizer">1</property>
|
||||
<object class="wxMenuBar" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_menubar</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<object class="wxMenu" expanded="1">
|
||||
<property name="label">dummy</property>
|
||||
<property name="name">m_menu1</property>
|
||||
<property name="permission">protected</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bMainSizer</property>
|
||||
|
|
|
@ -11,12 +11,13 @@
|
|||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include "kiway_player.h"
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
|
@ -45,6 +46,8 @@ class BM2CMP_FRAME_BASE : public KIWAY_PLAYER
|
|||
private:
|
||||
|
||||
protected:
|
||||
wxMenuBar* m_menubar;
|
||||
wxMenu* m_menu1;
|
||||
wxNotebook* m_Notebook;
|
||||
wxScrolledWindow* m_InitialPicturePanel;
|
||||
wxScrolledWindow* m_GreyscalePicturePanel;
|
||||
|
|
Loading…
Reference in New Issue