Closed Bug 389754 Opened 17 years ago Closed 17 years ago

button themeing goes away when applying full page zoom

Categories

(Core :: Widget, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ted, Assigned: sharparrow1)

References

Details

Attachments

(1 file)

Themed buttons (Cocoa or WinXP) lose their theme when zoomed, and turn back into "plain" buttons.
Please URL, testcase, or something can help to  reproduce your problem ...
In Firefox, open the error console and evaluate this:
top.window.opener.getBrowser().markupDocumentViewer.fullZoom = 1.2
Watch as the "Commit" button on the bottom of this page looses its native theme (color and shape).

These values work (natively styled buttons): 0.5, 1, 1.5, 2
2.4 and 2.5 (look the same!?), 3, ...
Attached patch PatchSplinter Review
I'm not sure if this fix is completely appropriate, but it seems right; the issue is that IsWidgetStyled is failing because pixel rounding of the border leads to different results.
Assignee: nobody → sharparrow1
Status: NEW → ASSIGNED
Attachment #274177 - Flags: review?(roc)
Comment on attachment 274177 [details] [diff] [review]
Patch

+#define NS_ROUND_BORDER_TO_PIXELS(l,tpp) \
+  ((l) == 0) ? 0 : PR_MAX((tpp), ((l) + ((tpp) / 2)) / (tpp) * (tpp))

Why can't we use the one in nsStyleStruct.h?
Actually, we can; and actually, nsNativeTheme already includes it (indirectly).

I thought it would complicate the includes or something like that, but I wasn't really thinking about it.
Comment on attachment 274177 [details] [diff] [review]
Patch

Patch fixes native theme style checks to check against the right standard border-width.  Should only have a significant affect with page zoom.
Attachment #274177 - Flags: approval1.9?
Component: GFX → Widget
QA Contact: general → general
Attachment #274177 - Flags: approval1.9? → approval1.9+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: