Fix 0-sized HTML window on OSX.

This commit is contained in:
Jeff Young 2021-09-27 12:47:14 +01:00
parent 956ec5b17c
commit 3e298f1175
4 changed files with 52 additions and 4 deletions

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialogs/dialog_display_html_text_base.h"
#include "dialog_display_html_text_base.h"
///////////////////////////////////////////////////////////////////////////
@ -16,6 +16,7 @@ DIALOG_DISPLAY_HTML_TEXT_BASE::DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent,
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
bMainSizer->SetMinSize( wxSize( 540,240 ) );
m_htmlWindow = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
bMainSizer->Add( m_htmlWindow, 1, wxALL|wxEXPAND, 5 );

View File

@ -54,7 +54,7 @@
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size">-1,-1</property>
<property name="minimum_size">540,240</property>
<property name="name">bMainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>

View File

@ -0,0 +1,49 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "dialog_shim.h"
#include <wx/html/htmlwin.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_DISPLAY_HTML_TEXT_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_DISPLAY_HTML_TEXT_BASE : public DIALOG_SHIM
{
private:
protected:
wxHtmlWindow* m_htmlWindow;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
// Virtual event handlers, overide them in your derived class
virtual void OnHTMLLinkClicked( wxHtmlLinkEvent& event ) { event.Skip(); }
public:
DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DISPLAY_HTML_TEXT_BASE();
};

View File

@ -94,8 +94,6 @@ void HTML_MESSAGE_BOX::reload()
background.GetAsString( wxC2S_HTML_SYNTAX ),
foreground.GetAsString( wxC2S_HTML_SYNTAX ),
m_source ) );
Layout();
}