Using the SmartGWTEE 3.1p build from 2/1 (SmartClient Version: v8.3p_2013-02-01/Enterprise Deployment (built 2013-02-01) on Firefox 18.0.1 on MacOSX, the HTMLPane component isn't resizing correctly when using custom padding via CSS. The padding isn't being honored, resulting in the text being pushed down. This component was rendering fine on the production release of 3.1p.
Here is a test case that you should be able to reproduce the problem with.
And the CSS is embedded in the main html:
Thanks,
Chris
Here is a test case that you should be able to reproduce the problem with.
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.types.Overflow; import com.smartgwt.client.widgets.HTMLPane; import com.smartgwt.client.widgets.layout.VLayout; public class PaddingIssue implements EntryPoint { public void onModuleLoad() { VLayout example = new VLayout(); example = new VLayout(); example.setOverflow(Overflow.VISIBLE); example.setWidth100(); HTMLPane rawPane = new HTMLPane(); rawPane.setStyleName("weatherPane"); rawPane.setBackgroundColor("#D6E9F2"); rawPane.setWidth100(); rawPane.setDefaultHeight(22); rawPane.setOverflow(Overflow.VISIBLE); rawPane.setContents("<PRE>" + "KDEN 012153Z 26027G33KT 10SM SCT080 SCT140 08/M09 A3001 RMK AO2 PK WND 27037/2120 SLP156 T00831089=" + "</PRE><P>"); example.addMember(rawPane); HTMLPane weatherPane = new HTMLPane(); weatherPane.setStyleName("weatherPane"); weatherPane.setBackgroundColor("#EEE"); weatherPane.setWidth100(); weatherPane.setDefaultHeight(22); weatherPane.setOverflow(Overflow.VISIBLE); weatherPane.setContents("METAR Published: day 01 at 21:53 Z <BR>Winds: from 260 at 27 KT gusting to: 33 " + "Minimum Visibility: 10 SM Sky Conditions: Scattered at 080, Scattered at 140 Temp: 08° C (46.4° F) " + "DewPoint: -09° C (15.8° F) Pressure (Altimeter): 30.01 inches Hg Remarks: RMK AO2 PK WND 27037/2120 SLP156 T00831089 " + "<P>"); example.addMember(weatherPane); example.draw(); } }
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- The HTML 4.01 Transitional DOCTYPE declaration--> <!-- above set at the top of the file will set --> <!-- the browser's rendering engine into --> <!-- "Quirks Mode". Replacing this declaration --> <!-- with a "Standards Mode" doctype is supported, --> <!-- but may lead to some differences in layout. --> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!-- --> <!-- Any title is fine --> <!-- --> <title>CustomDS</title> <!-- IMPORTANT : You must set the variable isomorphicDir to [MODULE_NAME]/sc/ so that the SmartGWT resource are correctly resolved --> <script> var isomorphicDir = "customds/sc/"; </script> <!-- --> <!-- This script loads your compiled module. --> <!-- If you add any GWT meta tags, they must --> <!-- be added before this line. --> <!-- --> <script type="text/javascript" language="javascript" src="customds/customds.nocache.js"></script> <style media="screen" type="text/css"> <!-- .weatherPane { padding-top:4px; padding-bottom:10px; padding-right:5px; padding-left:22px; font-family:"Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; font-size:11px; font-weight:normal; color:#555654; } --> </style> </head> <!-- --> <!-- The body can have arbitrary html, or --> <!-- you can leave the body empty if you want --> <!-- to create a completely dynamic UI. --> <!-- --> <body> <!-- OPTIONAL: include this if you want history support --> <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe> </body> </html>
Chris
Comment