Closed
Bug 674443
Opened 13 years ago
Closed 2 years ago
Make select element dropdown menu look more native
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mounir, Unassigned)
References
Details
Attachments
(6 files, 3 obsolete files)
118.56 KB,
image/png
|
Details | |
113.71 KB,
image/png
|
Details | |
1.22 KB,
patch
|
mstange
:
review-
|
Details | Diff | Splinter Review |
2.13 KB,
patch
|
Details | Diff | Splinter Review | |
3.35 KB,
patch
|
Details | Diff | Splinter Review | |
1.74 KB,
patch
|
jimm
:
review-
|
Details | Diff | Splinter Review |
Basically, this patch tries to make the select element dropdown menu looks like any other menu in the UI. That's how it should look like on MacOS X, GTK and Windows Vista/7. I'm not sure Windows XP is expecting that but I do not have a Windows XP VM around. I marked this bug as blocking bug 402625 because it seems that MacOS X dropdown menus do not look native with this patch. I will use bug 402625 to fix that for MacOS X. I will need people to confirm that it looks correct on other GTK theme than mine and on Windows XP/Vista/7 (if you are in CC and you wonder why, that might be the reason ;))
Attachment #548670 -
Flags: review?(bzbarsky)
Reporter | ||
Comment 1•13 years ago
|
||
A part of another part came with the previously attached one...
Attachment #548670 -
Attachment is obsolete: true
Attachment #548670 -
Flags: review?(bzbarsky)
Attachment #548672 -
Flags: review?(bzbarsky)
Reporter | ||
Updated•13 years ago
|
Whiteboard: [needs review]
Comment 2•13 years ago
|
||
Can you attach before/after screenshots?
Reporter | ||
Comment 3•13 years ago
|
||
(In reply to comment #2) > Can you attach before/after screenshots? I will but I've just seen an unexpected side effect on the select element height which gets even worse given that the text doesn't re-align.
Whiteboard: [needs review]
Reporter | ||
Comment 4•13 years ago
|
||
CCing bz in case of he has an idea of what causes the behavior described in comment 3.
Reporter | ||
Updated•13 years ago
|
Attachment #548672 -
Flags: review?(bzbarsky)
Reporter | ||
Comment 5•13 years ago
|
||
Reporter | ||
Comment 6•13 years ago
|
||
Reporter | ||
Comment 7•13 years ago
|
||
Unfortunately, on Mac, instead of just not being native, the dropdown menu is quite broken :( Hope stuff don't get worse on Windows :)
Comment 8•13 years ago
|
||
You mean the height of the actual combobox increases? That's quite purposeful. See nsComboboxDisplayFrame::Reflow and the comment at the start of nsComboboxControlFrame::Reflow. Basically, we want to be able to show any option in the display area without the options being cut off and without having to resize the combobox when the selected option changes. So we size the display area to the size of the options. Your patch is changing the size of the options, so changes the size of the display area.... That said, the current code is assuming that the height of options is due solely to the text in them. With this change, I bet that's no longer true due to them ending up with nonzero padding or something. So it would makes sense to account for that when computing the display area height.
Comment 9•13 years ago
|
||
One possible option is to stop worrying about the actual option text when computing the combobox height and just use the font-size of the combobox....
Comment 10•12 years ago
|
||
can this be fixed? this minor bug is extremely annoying compared to the whole design of firefox
Comment 11•12 years ago
|
||
(In reply to henry.fai.hang.chan from comment #10) > can this be fixed? this minor bug is extremely annoying compared to the > whole design of firefox +1
Comment 12•11 years ago
|
||
Any progress in this issue? :)
Reporter | ||
Comment 13•11 years ago
|
||
This patch makes the dropdown look native for GTK. I had to modify some widget code so I will likely have to modify other widgets to enable the feature on other platforms.
Attachment #548672 -
Attachment is obsolete: true
Reporter | ||
Comment 14•11 years ago
|
||
Reporter | ||
Comment 15•11 years ago
|
||
Attachment #791334 -
Attachment is obsolete: true
Attachment #791362 -
Flags: review?(dbaron)
Reporter | ||
Comment 16•11 years ago
|
||
Attachment #791363 -
Flags: review?(karlt)
Reporter | ||
Updated•11 years ago
|
Attachment #791358 -
Attachment description: Part 3 - Cocoa → Part 3 - Fix Cocoa backend
Attachment #791358 -
Flags: review?(mstange)
Reporter | ||
Comment 17•11 years ago
|
||
Attachment #791367 -
Flags: review?(jmathies)
Comment 18•11 years ago
|
||
Comment on attachment 791358 [details] [diff] [review] Part 3 - Fix Cocoa backend You can move nsNativeThemeWin::IsMenuActive to xpwidgets/nsNativeTheme, make your changes there, and use that from the Cocoa backend instead.
Attachment #791358 -
Flags: review?(mstange) → review-
Comment 19•11 years ago
|
||
Comment on attachment 791363 [details] [diff] [review] Part 2 - Fix GTK backend >+ // We want the item to look like hovered if it is checked too so the >+ // user can see the currently selected option easily. >+ aState->inHover |= GetContentState(aFrame, aWidgetType). >+ HasState(NS_EVENT_STATE_CHECKED); Is there any time when NS_EVENT_STATE_HOVER will be set here but not NS_EVENT_STATE_CHECKED? Having the highlight state set for both flags suggests there might be 2 options highlighted at one time. I assume that won't happen? Would replacing "|=" with "=" here behave as intended? I assume you only need my review of the widget/gtk2 changes.
Comment 20•11 years ago
|
||
Comment on attachment 791367 [details] [diff] [review] Part 4 - Fix Windows backend Review of attachment 791367 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/windows/nsNativeThemeWin.cpp @@ +1420,5 @@ > > + if (isHover || > + (aFrame->GetContent()->IsHTML() && > + eventState.HasAtLeastOneOfStates(NS_EVENT_STATE_HOVER | > + NS_EVENT_STATE_CHECKED))) { Can you break this out into a helper similar to IsMenuActive for html elements?
Attachment #791367 -
Flags: review?(jmathies) → review-
Updated•11 years ago
|
Attachment #791363 -
Flags: review?(karlt)
Comment 21•8 years ago
|
||
The last patch for this lies three years back. Mounir, do you still intend to fix this or should we unassign the bug for now? Sebastian
Flags: needinfo?(mounir)
Reporter | ||
Comment 22•8 years ago
|
||
Fair to say I will not fix this :)
Assignee: mounir → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(mounir)
We probably did a bunch of this when we switched to e10s selects.
Updated•2 years ago
|
Severity: normal → S3
Comment 24•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 12 votes.
:emilio, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Flags: needinfo?(emilio)
Comment 25•2 years ago
|
||
(In reply to David Baron :dbaron: from comment #23)
We probably did a bunch of this when we switched to e10s selects.
Indeed
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(emilio)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•