Note: There are a few cases of duplicates in user autocompletion which are being worked on.

button themeing goes away when applying full page zoom

RESOLVED FIXED

Status

()

Core
Widget
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: ted, Assigned: Eli Friedman)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
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 ...

Comment 2

10 years ago
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, ...
(Assignee)

Comment 3

10 years ago
Created attachment 274177 [details] [diff] [review]
Patch

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)
Attachment #274177 - Flags: superreview+
Attachment #274177 - Flags: review?(roc)
Attachment #274177 - Flags: review+
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?
(Assignee)

Comment 5

10 years ago
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.
(Assignee)

Comment 6

10 years ago
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?
(Assignee)

Updated

10 years ago
Component: GFX → Widget
QA Contact: general → general

Updated

10 years ago
Attachment #274177 - Flags: approval1.9? → approval1.9+
(Assignee)

Comment 7

10 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.