From 9bc1a827a65932b582efaf749e1f87ae9fbfda0b Mon Sep 17 00:00:00 2001 From: luca Date: Tue, 10 Nov 2009 11:03:00 +0000 Subject: [PATCH] =?UTF-8?q?Patch=20level=20=20=20=20=20=20=20=20=20:=20Fil?= =?UTF-8?q?es=20correlati=20=20=20=20=20:=20Ricompilazione=20Demo=20:=20[?= =?UTF-8?q?=20]=20Commento=20=20=20=20=20=20=20=20=20=20=20=20:=200001497:?= =?UTF-8?q?=20CD=20Descrizione=20=20Non=20esiste=20pi=C3=B9=20una=20doppia?= =?UTF-8?q?=20versione=20e=20quindi=20un=20doppio=20cd=20per=20la=20parte?= =?UTF-8?q?=20lavanderire.=20Il=20prodotto=20si=20chiama=20"COGECO=20Silav?= =?UTF-8?q?".=20Allego=20loghi=20ed=20icone.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.65.10.50/trunk@19600 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- setup/wizard.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/setup/wizard.cpp b/setup/wizard.cpp index ae504d58c..327329dd6 100755 --- a/setup/wizard.cpp +++ b/setup/wizard.cpp @@ -1953,13 +1953,20 @@ CampoWizard::CampoWizard(wxWindow* pParent) nHeight = iLogo.GetHeight(); } - const int nMax = 216; - if (nWidth > nMax) + const double nMaxWidth = 216; + const double nMaxHeight = 600; + + const double dScaleX = nMaxWidth / nWidth; + const double dScaleY = nMaxHeight / nHeight; + const double dScale = dScaleX < dScaleY ? dScaleX : dScaleY; + + if (dScale < 1) { - nHeight = nHeight * nMax / nWidth; - nWidth = nMax; + nHeight *= dScale; + nWidth *= dScale; iLogo.Rescale(nWidth, nHeight, wxIMAGE_QUALITY_HIGH); } + const wxBitmap bitmap(iLogo); Create(pParent, wxID_ANY, PRODUCT, bitmap);