Closed
Bug 228499
Opened 21 years ago
Closed 21 years ago
[fix] Aqua form buttons draw incorrectly when the content (text) is to small (and other form widget fixes)
Categories
(Camino Graveyard :: HTML Form Controls, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino1.0
People
(Reporter: camino, Assigned: mikepinkerton)
References
()
Details
Attachments
(2 files, 6 obsolete files)
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6b) Gecko/20031205 Camino/0.7+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6b) Gecko/20031205 Camino/0.7+
On some occasions the text that is displayed in abutton has only 2 letters (go)
this results in horrible looking icons. For an example go to
http://www.mozilla.org.
This is also a testcase page:
http://web.mit.edu/bzbarsky/www/testcases/form-baseline/buttonTest-quirk.html?
Reproducible: Always
Steps to Reproduce:
Go to the given url's.
Actual Results:
The button on mozilla.org is drawn incorrectly.
Fixed issue's:
- introduced a minimum button width to make sure a button <input tupe="reset">
is always drawn correctly.
- adjusted all form widgets margings to make sure that form widgets do not get
painted over or on top each other (spymac forum bug).
- made sure that the <button></button> fom widget has a size that coresponds
with a more general aqua sized button. And is not some kind of odd blob.
Updated•21 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Some other things we should look at.
- widget focus drawing is no longer present in 10.3 and has always had issues in
Camino, do we still need it?
- shouldn't we introduce a fixed font size and fixed button size to make sure
buttons always look the way they are intended by Apple?
- Is it possible to implement small scroll bars for large text fields and select
fields? Becuase we are now drawing large scrollbars wich cuases some strange
behaviour (scrooll bars that are painted when not necesarry and no sroll bars
when they should be painted?)
Assignee | ||
Comment 3•21 years ago
|
||
bryner thought the min-width should be expressed in the native theme code, not
in css. i'll look at that.
Status: NEW → ASSIGNED
Target Milestone: --- → Camino0.8
Assignee | ||
Comment 4•21 years ago
|
||
is this a dupe of 221922?
Comment 5•21 years ago
|
||
find . -name "platform-forms.css"
./camino/build/Camino.app/Contents/MacOS/res/platform-forms.css
./dist/bin/res/platform-forms.css
./dist/Embed/res/platform-forms.css
./dist/MozillaDebug.app/Contents/MacOS/res/platform-forms.css
./layout/html/document/src/mac/platform-forms.css
./layout/html/document/src/os2/platform-forms.css
./layout/html/document/src/win/platform-forms.css
Which one is the one we use ? the one from embed ? or the one from sr/mac ?
Mike: Well part of Bug 221922 is fixed by this bug (mis shapen buttons, bt not
the margins).
Ludo: ./camino/build/Camino.app/Contents/MacOS/res/platform-forms.css
Comment 7•21 years ago
|
||
Jasper : nope the file comes from one of the other files Given by the find command.
Assignee | ||
Comment 8•21 years ago
|
||
*** Bug 221922 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 9•21 years ago
|
||
the one from src/mac gets copied into embed, and that's where we pick it up.
Assignee | ||
Comment 10•21 years ago
|
||
the width however should be in the c++....it's very odd that the css fixes it.
Reporter | ||
Comment 11•21 years ago
|
||
I agree that there should come a better fix than my current css one. But could
we at least use it untill some one really fixes it. This is one of those bugs
that makes us look like the odd duck. And the temporaray fix I slaped together
is real easy.
Comment 12•21 years ago
|
||
Jasper do you want a review? Set the review? bit :-)
Attachment #137442 -
Flags: review?(sbwoodside)
Reporter | ||
Comment 13•21 years ago
|
||
I made a html page which contains a collection of all the things going wrong
with buttons in Camino. Conclusion is that we are allowing the use of to much
styles in button resulting in numerous opertunities to break buttons.
- we should not allow any form of styles aprt from font size and weight at max.
- we should give buttons more marging making sure they do not paint over each
other.
- we should introduce minimum button width
That would solve most of our problems. And perhaps it would be even better if
we would just ban all forms of styling, that way our buttons would just look
like any other button on OS X (just like safari). It would rule out any
posibility of badly drawn widgets.
Attachment #138086 -
Attachment description: Pain bank page for buttons. → Pain bank page for buttons. Close you eyes!
Reporter | ||
Comment 14•21 years ago
|
||
I also noticed that buttons that have styled text using pt sizes have different
margins than buttons styled using px sizes?? What's going on there?
Reporter | ||
Comment 15•21 years ago
|
||
Bug 205136 seems to be a duplicate of this bug. It talks about one of the
aspects mentioned in this bug.
Attachment #138086 -
Attachment is obsolete: true
Comment 16•21 years ago
|
||
I think that we should allow different sizes of text at a minimum. I don't know
if I agree that we should only allow one size of button text. Otherwise I agree
that limiting the styling is OK and assigning a minimum width is good too.
Assignee | ||
Comment 17•21 years ago
|
||
landed jasper's css file. what do we want to do with the other problems? i guess
if we keep this open, we don't need this fixed quite as badly anymore, pushing
out to 1.0
Target Milestone: Camino0.8 → Camino1.0
Assignee | ||
Updated•21 years ago
|
Attachment #137442 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #137442 -
Flags: review?(sbwoodside) → review+
Reporter | ||
Comment 18•21 years ago
|
||
some hints to really fix this should be found here:
http://www.mozilla.org/projects/xul/theme.html
Reporter | ||
Comment 19•21 years ago
|
||
Ok I tracked down the border issue more.
In platform-forms.css we define the button border for aqua buttons as follows:
border-width: 2px 8px 2px 8px;
Reporter | ||
Comment 20•21 years ago
|
||
Ok I tracked down the border issue more.
In platform-forms.css we define the button border for aqua buttons as follows:
(border-width: 2px 8px 2px 8px;
Assignee | ||
Comment 21•21 years ago
|
||
jasper, I'm not sure what that nsITheme page points out...that's already how
we're implementing this.
Reporter | ||
Comment 22•21 years ago
|
||
I will add a new .css that will fix othyer things.
Attachment #138185 -
Attachment is obsolete: true
Reporter | ||
Comment 23•21 years ago
|
||
Ok this css file fixes the following bugs:
- check boxes are not correctly vertically alligned with text baseline
- radio buttons are not correctly vertically alligned with text baseline
- text in input doesn't align with the base line of text outside of it
- disabled text fields have mozilla style instead of our style
Result:
We look yet again better than before, we are looking very much like native
widgets. We even look better than Safari on some points :)
Reporter | ||
Comment 24•21 years ago
|
||
Mike,
The problem as I tracked it down for the border style issue is as folows.
1) We have nsITheme that lays out the basic buton styles by using the aqua
resources and XUL?
2) we have a platform-forms.css document that fine tunes the results comming
from nsITheme.
3) but when ever a webpage has certain custom styles for form elements nsITheme
overrides the platform-forms.css settings.
The border issue is a result of this. Platform-forms.css gives detailed
information on how to paint a button by using a border-width style method to
make sur the text is nicely aligned within the button. But when a page has
custom border style in it's button it overrides the detailed border in
platform-forms.css resulting in a malformed button.
Unless ofcorse if the border style in the button is axactly the same as in
platfor-forms.ccss, which is a small chance.
Reporter | ||
Comment 25•21 years ago
|
||
In this version I tried a new approach to dawing the buttons to make sure the
border issue get fixed. And it works :), except if we have a button size and
spacing style in one button. But still is 10x better than what we had.
New fixes:
- fixed diabled buttons
- tweeked alignment of radio and check boxes
- also tweeked all the widgets to make sure that the button text baselines now
are on the same hight as the page text basline.
Please test and look closely to all the different pages that use forms to see
if there is anything else we could fix.
Attachment #139745 -
Attachment is obsolete: true
Attachment #139745 -
Attachment is obsolete: false
Attachment #139746 -
Attachment is obsolete: true
Reporter | ||
Comment 26•21 years ago
|
||
Same fixes but slightly tweeked to work on morepages correctly.
Took out the new border drawing method, still not good enough.
Attachment #139914 -
Attachment is obsolete: true
Reporter | ||
Comment 27•21 years ago
|
||
I took out parts of the css that aligned most form widgets. since it caused
some trouble on several webpages :)
I also simplified some of the css by combining styles which results in more
compact css and has the same functionality.
Attachment #140070 -
Attachment is obsolete: true
Assignee | ||
Comment 28•21 years ago
|
||
landed last patch, closing out bug.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Summary: [fix] Aqua form buttons draw incorrect when the content (text) is to small (and other form widget fixes) → [fix] Aqua form buttons draw incorrectly when the content (text) is to small (and other form widget fixes)
You need to log in
before you can comment on or make changes to this bug.
Description
•