Closed
Bug 329144
Opened 19 years ago
Closed 18 years ago
[Mac] Classic: Selected items should use darker system highlight color
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey1.1alpha
People
(Reporter: stefanh, Assigned: stefanh)
References
Details
(Keywords: fixed-seamonkey1.1a, fixed1.8.1, Whiteboard: ETA: seamonkey1.1a)
Attachments
(6 files, 3 obsolete files)
22.27 KB,
image/png
|
Details | |
12.29 KB,
image/gif
|
Details | |
23.59 KB,
image/gif
|
Details | |
11.50 KB,
patch
|
asaf
:
review+
neil
:
superreview+
kairo
:
approval-seamonkey1.1a+
|
Details | Diff | Splinter Review |
71.71 KB,
image/gif
|
Details | |
3.23 KB,
patch
|
Details | Diff | Splinter Review |
We should re-style classic's tree.css a bit. Selected treerows should be blue. I'm basically going to rip what's needed from toolkit's pinstripe theme here...
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #213789 -
Flags: review?(mnyromyr)
Comment 2•19 years ago
|
||
>Index: themes/classic/global/mac/tree.css
>===================================================================
> tree {
>- -moz-appearance: treeview;
> margin: 0px 4px;
>- border: 2px solid;
>- -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
>- -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
>- -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
>- -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
...
> treechildren::-moz-tree-row {
>- -moz-appearance: treeitem;
> treechildren::-moz-tree-separator {
>- -moz-appearance: separator;
>- border-top: 1px solid ThreeDShadow;
>- border-right: 1px solid ThreeDHighlight;
>- border-bottom: 1px solid ThreeDHighlight;
>- border-left: 1px solid ThreeDShadow;
I'm not at all comfortable with these. Why are you removing the native look and replacing it by arbitrary colour values? -moz-appearance and ThreeD* are there for a reason...
Comment 3•19 years ago
|
||
Currently active tree items paint in the "Highlight" colour, which (on the Mac) appears to be the same as the text selection background and the menu hover. If this is incorrect then mac/nsLookAndFeel.cpp should be corrected instead.
Assignee | ||
Comment 4•19 years ago
|
||
In reply to comment #2)
.
.
.
.
> I'm not at all comfortable with these. Why are you removing the native look and
> replacing it by arbitrary colour values? -moz-appearance and ThreeD* are there
> for a reason...
>
"-moz-appearance" overrules border styles. I guess the borders are still there because noone bothered to removed them when the appearance styles where introduced. Fwiw, we also have an issue with native-styled trees, see bug 301060. Fwiw, I don't really trust the mac native styling either - some stuff origins from the pre-OS X days...
> treechildren::-moz-tree-row {
>- -moz-appearance: treeitem;
This might have been an overkill, though. Hmm, I know see that it might look better if I could use an outline instead of a border for the focusring - there's a 2px gap (left/right) on selected rows when the tree doesn't have focus.
Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #3)
> Currently active tree items paint in the "Highlight" colour, which (on the Mac)
> appears to be the same as the text selection background and the menu hover. If
> this is incorrect then mac/nsLookAndFeel.cpp should be corrected instead.
>
Well, I fear that noone will do that. See bug 301364. Josh doesn't want to fix anything more it seems (https://bugzilla.mozilla.org/show_bug.cgi?id=301364#c6).
Assignee | ||
Comment 6•19 years ago
|
||
Assignee | ||
Comment 7•19 years ago
|
||
I've done some investigation regarding the CSS "Highlight" colour:
Currently, the mac "Highlight" colour is the one that appears on < 10.3. What we want is the Appearance Manager constant "kThemeBrushAlternatePrimaryHighlightColor". However, since we're building against the 10.2.8 sdk (and thus using the 10.2.8 Appearance.h) that won't work. The 10.2.8 Appearance.h only has "kThemeBrushPrimaryHighlightColor" - and that returns the old colour.
If you build without the 10.2.8 sdk or use the 10.4u sdk (intel builds) it will work, though.
One could of course use the old colour as a fallback in mac/nsLookAndFeel.cpp. One problem with that might be that "Highlight" on 10.2 doesn't imply that the textcolour change - but it does on 10.3 and higher.
Assignee | ||
Updated•19 years ago
|
Attachment #213789 -
Flags: review?(mnyromyr)
Comment 8•19 years ago
|
||
(In reply to comment #7)
> Currently, the mac "Highlight" colour is the one that appears on < 10.3. What
> we want is the Appearance Manager constant
> "kThemeBrushAlternatePrimaryHighlightColor". However, since we're building
> against the 10.2.8 sdk (and thus using the 10.2.8 Appearance.h) that won't
> work. The 10.2.8 Appearance.h only has "kThemeBrushPrimaryHighlightColor" - and
> that returns the old colour.
According to Apple's release notes this brush is available on 10.2 but wasn't documented until 10.3:
http://developer.apple.com/releasenotes/Carbon/HIToolboxOlderNotes.html
So if you need to use it with the 10.2.8 SDK, you could hardcode the value (-5) or #define it onesself.
Assignee | ||
Comment 9•19 years ago
|
||
> So if you need to use it with the 10.2.8 SDK, you could hardcode the value (-5)
> or #define it onesself.
Ah, right. This seems to work - not tested on 10.2, though. Hmm, a change like this is a rather large change in the ui. You'll need to tweak some css files, since this affects not just trees...
Assignee | ||
Updated•19 years ago
|
Depends on: 240320
Summary: [Mac] Classic: Selected treerows should be blue → [Mac] Classic: Selected items should use darker system highlight color
Assignee | ||
Comment 10•18 years ago
|
||
I'm just attaching a patch that will change the selection highlight color for autocomplete/history items - I might incorporate this one with the forthcoming tree/listbox patch.
Assignee | ||
Comment 11•18 years ago
|
||
New patch coming up in a few days...
Status: NEW → ASSIGNED
Whiteboard: ETA: seamonkey1.1a
Target Milestone: --- → mozilla1.8.1
Assignee | ||
Comment 12•18 years ago
|
||
OK, so the search box with the "Search x for y" is styled in navigator.css...
navigator.css:
------------------------------------------------------
264 .autocomplete-search-engine[menuactive="true"] {
265 background-color: Highlight;
266 color: HighlightText;
267 }
------------------------------------------------------
Hmm...
Assignee | ||
Comment 13•18 years ago
|
||
> OK, so the search box with the "Search x for y" is styled in navigator.css...
> navigator.css:
> ------------------------------------------------------
> 264 .autocomplete-search-engine[menuactive="true"] {
> 265 background-color: Highlight;
> 266 color: HighlightText;
> 267 }
> ------------------------------------------------------
>
> Hmm...
>
Neil, I suppose there is no way for me to overrule this someplace in global/mac? I need to use background-color: -moz-mac-alternateprimaryhighlight; and white color for the text...
Comment 14•18 years ago
|
||
I guess we could always move the rule to autocomplete.css unless someone (jag?) has any better ideas...
Assignee | ||
Comment 15•18 years ago
|
||
While I'm at it... As you can see in the image I would rather prefer "GrayText" or something.
navigator.css:
246 .autocomplete-treebody::-moz-tree-cell-text(comment) {
247 color: ThreeDShadow;
248 }
Assignee | ||
Comment 16•18 years ago
|
||
Ah, I always wondered why there is a white border at the top of the search box... Hmm, those style rules (in navigator.css) doesn't work for mac either:
-------------------------------------------------------
.autocomplete-search-box {
border-top: 2px groove -moz-Dialog;
background-color: -moz-Dialog;
color: ButtonText;
}
.autocomplete-result-popup[nomatch] > .autocomplete-search-box {
border-top: 1px solid ThreeDHighlight;
}
-------------------------------------------------------
Both of the border colours seems to produce a white (1px) border at the top of the search box.
I can only explain the last one: widget/src/mac/nsLookAndFeel.cpp#268 returns a white colour for ThreeDHighlight... (I don't know if the fallback colour is used or not).
Anyway, the solution here seems to be to move those style rules as well...
Assignee | ||
Comment 17•18 years ago
|
||
Just to show you what I mean. Note that this is with a 1.8.0.2 build (some changes might have been made, but the border remains).
Assignee | ||
Updated•18 years ago
|
Component: Themes → General
Product: Core → Mozilla Application Suite
Target Milestone: mozilla1.8.1 → seamonkey1.1alpha
Assignee | ||
Comment 18•18 years ago
|
||
This patch will change all the selection highlight colors and fix some issues in autocomplete (I had to move 4 style rules from navigator.css to autocomplete.css).
1: New top border on the search box
2: I decided to not use any border on the search box when there is no result to show in the search box (ie "nomatch"). The surrounding autocomplete-result-popup border will work as a "top" border here instead.
3 & 4: New mac highlight colors.
Attachment #228597 -
Flags: superreview?(neil)
Attachment #228597 -
Flags: review?(bugs.mano)
Assignee | ||
Comment 19•18 years ago
|
||
Attachment #213789 -
Attachment is obsolete: true
Attachment #214362 -
Attachment is obsolete: true
Attachment #226022 -
Attachment is obsolete: true
Comment 20•18 years ago
|
||
Comment on attachment 228597 [details] [diff] [review]
Patch - change highlight colors etc
Should you move Modern's styles for consistency?
Attachment #228597 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 21•18 years ago
|
||
(In reply to comment #20)
> (From update of attachment 228597 [details] [diff] [review] [edit])
> Should you move Modern's styles for consistency?
>
Are the themes consistent now?
Comment 22•18 years ago
|
||
(In reply to comment #21)
>(In reply to comment #20)
>>Should you move Modern's styles for consistency?
>Are the themes consistent now?
Well noow that I look at the patch again, I think it would be best if you moved all of those autocomplete styles into autocomplete.css in both themes.
Assignee | ||
Comment 23•18 years ago
|
||
(In reply to comment #22)
> (In reply to comment #21)
> >(In reply to comment #20)
> >>Should you move Modern's styles for consistency?
> >Are the themes consistent now?
> Well noow that I look at the patch again, I think it would be best if you moved
> all of those autocomplete styles into autocomplete.css in both themes.
>
OK, but I don't think we can get rid of all the autocomplete rules in navigator.css, since there are cases where the same class is styled differently in resp file.
Assignee | ||
Comment 24•18 years ago
|
||
Fwiw, Neil thought it was ok (on irc)to not move any more style rules.
Comment 25•18 years ago
|
||
Comment on attachment 228597 [details] [diff] [review]
Patch - change highlight colors etc
r=mano
Attachment #228597 -
Flags: review?(bugs.mano) → review+
Assignee | ||
Comment 26•18 years ago
|
||
Comment on attachment 228597 [details] [diff] [review]
Patch - change highlight colors etc
Neil, can you check in the patch, please?
Assignee | ||
Comment 27•18 years ago
|
||
Checked in by Neil (thanks).
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 28•18 years ago
|
||
Comment on attachment 228597 [details] [diff] [review]
Patch - change highlight colors etc
I would like this for 1.1a - another small ui enhancement for users of mac classic...
Attachment #228597 -
Flags: approval-seamonkey1.1a?
Comment 29•18 years ago
|
||
Comment on attachment 228597 [details] [diff] [review]
Patch - change highlight colors etc
sound good. a=me for 1.1a
Attachment #228597 -
Flags: approval-seamonkey1.1a? → approval-seamonkey1.1a+
Assignee | ||
Comment 30•18 years ago
|
||
The trunk diff of tree.css doesn't apply on branch (because of bug 296040). Here's a branch-friendly diff of tree.css. That said, any chance you could check in the approved patch on 1.8 branch, KaiRo?
Comment 31•18 years ago
|
||
Checked in attachments #228597 and #232927 on MOZILLA_1_8_BRANCH.
Keywords: fixed-seamonkey1.1a,
fixed1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•