Fix 54963: mousewheel text sizing not bounded, and lower upper bound (to 2000%). patch by Jonas Sicking (sicking@bigfoot.com). r=bryner,blake a=ben

This commit is contained in:
blakeross%telocity.com 2001-01-05 23:06:09 +00:00
parent bd46b43cac
commit f7bc22e0b4
3 changed files with 7 additions and 3 deletions

View File

@ -802,7 +802,9 @@ nsEventStateManager::ChangeTextSize(PRInt32 change)
float textzoom;
mv->GetTextZoom(&textzoom);
mv->SetTextZoom(textzoom + 0.1*change);
textzoom += 0.1*change;
if (textzoom > 0 && textzoom <= 20)
mv->SetTextZoom(textzoom);
return NS_OK;
}

View File

@ -802,7 +802,9 @@ nsEventStateManager::ChangeTextSize(PRInt32 change)
float textzoom;
mv->GetTextZoom(&textzoom);
mv->SetTextZoom(textzoom + 0.1*change);
textzoom += 0.1*change;
if (textzoom > 0 && textzoom <= 20)
mv->SetTextZoom(textzoom);
return NS_OK;
}

View File

@ -969,7 +969,7 @@ function BrowserPrint()
function setTextZoomOther() {
// open dialog and ask for new value
var o = { retvals: {zoom: zoomOther}, zoomMin: 1, zoomMax: 5000 };
var o = { retvals: {zoom: zoomOther}, zoomMin: 1, zoomMax: 2000 };
window.openDialog( "chrome://navigator/content/askViewZoom.xul", "", "chrome,modal,titlebar", o);
if (o.retvals.zoomOK) {
zoomOther = o.retvals.zoom;