From 892a76f771254341f85ba6fded22af70a49503c7 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 25 Oct 2006 08:49:50 +0000 Subject: [PATCH] Better button size on wxX11 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/prntbase.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 15fd936c1a..43d346a4db 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -890,27 +890,38 @@ void wxPreviewControlBar::CreateButtons() item0->Add( m_printButton, 0, wxALIGN_CENTRE|wxALL, 5 ); } + // Exact-fit buttons are too tiny on wxUniversal + int navButtonStyle; + wxSize navButtonSize; +#ifdef __WXUNIVERSAL__ + navButtonStyle = 0; + navButtonSize = wxSize(50, m_closeButton->GetSize().y); +#else + navButtonStyle = wxBU_EXACTFIT; + navButtonSize = wxDefaultSize; +#endif + if (m_buttonFlags & wxPREVIEW_FIRST) { - m_firstPageButton = new wxButton( this, wxID_PREVIEW_FIRST, _("|<<"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + m_firstPageButton = new wxButton( this, wxID_PREVIEW_FIRST, _("|<<"), wxDefaultPosition, navButtonSize, navButtonStyle ); item0->Add( m_firstPageButton, 0, wxALIGN_CENTRE|wxALL, 5 ); } if (m_buttonFlags & wxPREVIEW_PREVIOUS) { - m_previousPageButton = new wxButton( this, wxID_PREVIEW_PREVIOUS, _("<<"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + m_previousPageButton = new wxButton( this, wxID_PREVIEW_PREVIOUS, _("<<"), wxDefaultPosition, navButtonSize, navButtonStyle ); item0->Add( m_previousPageButton, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 ); } if (m_buttonFlags & wxPREVIEW_NEXT) { - m_nextPageButton = new wxButton( this, wxID_PREVIEW_NEXT, _(">>"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + m_nextPageButton = new wxButton( this, wxID_PREVIEW_NEXT, _(">>"), wxDefaultPosition, navButtonSize, navButtonStyle ); item0->Add( m_nextPageButton, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 ); } if (m_buttonFlags & wxPREVIEW_LAST) { - m_lastPageButton = new wxButton( this, wxID_PREVIEW_LAST, _(">>|"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + m_lastPageButton = new wxButton( this, wxID_PREVIEW_LAST, _(">>|"), wxDefaultPosition, navButtonSize, navButtonStyle ); item0->Add( m_lastPageButton, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 ); } -- 2.45.2