Closed Bug 430212 Opened 16 years ago Closed 16 years ago

not enough padding on textbox and textarea widgets on Vista

Categories

(Core :: Widget: Win32, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9

People

(Reporter: beltzner, Assigned: beltzner)

References

()

Details

Attachments

(4 files)

Certain widgets don't seem to have enough padding on them in Vista, probably due to the way we apply padding. I've started to look into this, and found some pretty strange things:

Using the main search field on bugzilla.mozilla.org as an example:

 Fx2: 20px
 Fx3: 18px
 IE8: 22px  (but all of its text seems ... large)

Using the home page field in the Options panel as an example:

 Fx2: 20px
 Fx3: 15px
 (The default textbox size on Windows Vista seems to be 18px in chrome)

Changing the padding we add in nsNativeThemeWin (line 1529) from 1px to 2px results in:

 20px - search field on bugzilla.mozilla.org
 17px - home page field in Options panel

Also, changing that calls attention to what I can only assume was a longer standing bug in the textbox that shows the default download folder location, where there's a 1px (2px after modification) white outline around the content.

I'm not sure what's going on here. Are we specifying padding anywhere else? If we can't figure it out, I think changing the padding from 1px to 2px puts us in a slightly better state, and almost in line with the defaults on Windows.
This is a start ...
Attachment #316951 - Flags: review?(vladimir)
Comment on attachment 316951 [details] [diff] [review]
add 2px of padding instead of 1px

I actually prefer the look of dropdowns as-is, but it's fine.  Please update the comment immediately above the block you changed to reflect the new value.

Also, the white border comes from some stupid hardcoded focus rectangle drawing code that draws the rectangle in -white- if focus isn't present, instead of transparent.  I had a patch to fix it a few weeks ago, but after talking with roc we decided to wait until after 1.9 for that because we weren't sure how it would affect a11y or other things.
Attachment #316951 - Flags: review?(vladimir) → review+
Updates comment block as per review comment.

Drivers: low-to-no risk, Vista-only modification, fixes a highly visible reduction of textbox sizes in chrome widgets which has a small usability effect of also resulting in smaller hit targets.
Attachment #317009 - Flags: review+
Attachment #317009 - Flags: approval1.9?
Comment on attachment 317009 [details] [diff] [review]
add 2px of padding instead of 1px, update comment block

Looks safe enough, I'll be impressed if you put the tree in flames with this! :)
Attachment #317009 - Flags: approval1.9? → approval1.9+
Assignee: nobody → beltzner
mozilla/widget/src/windows/nsNativeThemeWin.cpp 	3.120
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: