Fix about dialog padding on GTK builds.

As expected, the required padding difference between wxStaticText and
wxHyperlinkCtrl varies depending on the platform.  Restore the original
padding which was correct for windows and add the extra padding required
for GTK builds.  Someone with MacOS should verify if the padding looks
correct and change the padding for MacOS as required.
This commit is contained in:
Wayne Stambaugh 2020-07-11 22:42:46 +00:00
parent 7cbaeae265
commit e254d8cd29
1 changed files with 15 additions and 2 deletions

View File

@ -197,6 +197,18 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxAuiNotebook* aParent, const w
const wxBitmap& aIcon,
const CONTRIBUTORS& aContributors)
{
// The left justification between wxStaticText and wxHyperlinkCtrl is different so
// we must pad to make the alignment look decent.
//
// @todo Just make all of the contributor lists HTML so the alignment is consistent.
wxString padding;
// Of course the padding is different depending on the platform so we adjust the
// padding accordingly.
#if defined( __WXGTK__ )
padding += " ";
#endif
wxBoxSizer* bSizer = new wxBoxSizer( wxHORIZONTAL );
wxScrolledWindow* m_scrolledWindow1 = new wxScrolledWindow( aParent, wxID_ANY,
@ -257,7 +269,7 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxAuiNotebook* aParent, const w
if( sub_contributor->GetUrl().IsEmpty() )
{
ctrl = new wxStaticText( m_scrolledWindow1, wxID_ANY,
wxT( " " ) + sub_contributor->GetName(),
padding + wxT( "" ) + sub_contributor->GetName(),
wxDefaultPosition,
wxDefaultSize, 0 );
}
@ -268,7 +280,8 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxAuiNotebook* aParent, const w
wxT( "" ) + sub_contributor->GetName(),
sub_contributor->GetUrl(),
wxDefaultPosition,
wxDefaultSize );
wxDefaultSize,
wxBORDER_NONE | wxHL_CONTEXTMENU | wxHL_ALIGN_LEFT );
}
m_staticText1->Wrap( -1 );