开发者

Textbox height in a small browser window

I have here a peculiar problem. We have a RAP application intended for use on a PDA/phone, but when it is displayed in a small browser window, all the textboxes on the form(s) are too tall (around twice the height they should be).

I've stepped through the code (The form is using GridLayout, number of columns=1, make columns equal=false) and have found that the TextSizeDetermination.getCharHeight() method returns an incorrect font size if the browser window is too small - 13px if the window is large, 26px (exactly double) if the window is too small.

Interestingly enough, it seems that if the window is too small, probeStore.containsProbeResult(font) in that method returns true and uses probeStore.getProbeResult(...).getSize().y for the font size. Otherwise, if the window is larger, it returns false and uses TextSizeEstimation.getCharHeight(...).

Does anyone have a pointer or two for getting ar开发者_运维问答ound this?

Dialog with a properly-sized window:

alt text http://70.38.7.140/tmp/Screenshot1.png

Dialog with a small window:

alt text http://70.38.7.140/tmp/Screenshot2.png


This was a bug in RAP's TextSizeDetermination class. Has been fixed now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜