### Eclipse Workspace Patch 1.0 #P org.eclipse.help.webapp Index: advanced/searchScoped.jsp =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.help.webapp/advanced/searchScoped.jsp,v retrieving revision 1.16 diff -u -r1.16 searchScoped.jsp --- advanced/searchScoped.jsp 12 Jan 2007 19:38:35 -0000 1.16 +++ advanced/searchScoped.jsp 22 Mar 2007 18:02:46 -0000 @@ -1,5 +1,5 @@ <%-- - Copyright (c) 2000, 2004 IBM Corporation and others. + Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at @@ -123,16 +123,38 @@ var isMozilla = navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5; var advancedDialog; -var w = 300; -var h = 300; -function openAdvanced() -{ - var scope = document.getElementById("scope").firstChild; - var workingSet = ""; - if (scope != null) - workingSet = document.getElementById("scope").firstChild.nodeValue; - +function openAdvanced() +{ + var scope = document.getElementById("scope").firstChild; + var workingSet = ""; + if (scope != null) + workingSet = document.getElementById("scope").firstChild.nodeValue; + var minSize = 300; + var maxHeight= 500; + var maxWidth = 600; + var w = minSize; + var h = minSize; + + // If we have large fonts make the dialog larger, up to 500 pixels high, 600 wide + try { + var letterHeight = document.getElementById("searchWord").offsetHeight; + var requiredSize = 16 * letterHeight; + if (requiredSize > minSize) { + if (requiredSize < maxWidth) { + w = requiredSize; + } else { + w = maxWidth; + } + if (requiredSize < maxHeight) { + h = requiredSize; + } else { + h = maxHeight; + } + } + + } catch (e) {} + <% if (data.isIE()){ %>