The default bug view has changed. See this FAQ.

[10.5] Add roundness to context menus

VERIFIED FIXED in mozilla1.9.2a1

Status

()

Core
Widget: Cocoa
P3
minor
VERIFIED FIXED
10 years ago
6 years ago

People

(Reporter: Samuel Sidler (old account; do not CC), Assigned: mstange)

Tracking

({polish, verified1.9.1})

Trunk
mozilla1.9.2a1
PowerPC
Mac OS X
polish, verified1.9.1
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9.1 -
wanted1.9.1 +
blocking1.9 -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [radar:5430472][polish-hard][polish-visual][polish-p2])

Attachments

(3 attachments, 1 obsolete attachment)

In 10.5, context menus have rounded corners. We should have the same.
I believe bug 307204 is required for us to be able to do this. Not 100% sure.
Depends on: 307204

Comment 2

10 years ago
I don't want to "fake" that stuff with translucent windows. The rounded corners should be a window API option in 10.5, a switch we can flip. If that isn't the case we need to file an urgent bug with Apple to fix that.

Removing the dependency until we're sure these two are tied together.
No longer depends on: 307204
filed a request for rounded corners on NSWindow as rdar://problem/5430472
Whiteboard: [radar:5430472]
Got a response from Apple in the bug:

We need to set the window to transparent, and then use HITHemeDrawMenuBackround to draw the background, with kThemeMenuTypePopUp as the menuType param for the MenuDrawInfo.

Should be a piece of cake.
Adding CGContextClearRect() (which is what Apple suggested we use) in NS_THEME_MENUPOP and NS_THEME_MENUITEM seemed to do *something* on my 10.4 machine (added additional transparency). Tried it earlier today while sheriffing.
Duplicate of this bug: 391985
Assignee: joshmoz → cbarrett

Comment 7

10 years ago
Created attachment 283096 [details]
screenshot 1

With the window set to .95 opacity following the steps in comments 4 and 5 leads to this (screenshot).
josh do you want to take back this bug, per our discussion a few days ago?
With all the work we've done to on controls it would be a shame if this bug got lost in the shuffle.

Nominating for blocking so we don't forget about it (p5 would be an appropriate priority, imo)
Flags: blocking1.9?

Updated

10 years ago
Flags: blocking1.9? → blocking1.9+
Priority: -- → P5
I assume this will also take care of the blurring that appears to go on behind menus on leopard? how about the fading out of menus as they close?
(In reply to comment #10)
> I assume this will also take care of the blurring that appears to go on behind
> menus on leopard? how about the fading out of menus as they close?

Probably to the first, no to the second.
Filed bug 406997 for the second.

Updated

9 years ago
Assignee: cbarrett → joshmoz

Comment 13

9 years ago
This is a purely aesthetic issue and not a regression. blocking1.9-
Flags: wanted1.9+
Flags: blocking1.9-
Flags: blocking1.9+
Priority: P5 → --
Keywords: polish
Duplicate of this bug: 414498

Comment 15

9 years ago
Any update on the status of the radar bug? I tried the steps in comment #4 and comment #5 on 10.5.2, but no rounded corners :-/
Flags: blocking1.9.1?

Comment 16

9 years ago
I can't imagine blocking on this but we want it for sure.
Flags: wanted1.9.1+
Flags: wanted1.9+
Flags: blocking1.9.1?
Flags: blocking1.9.1-

Updated

9 years ago
Priority: -- → P3
(Assignee)

Updated

9 years ago
Depends on: 450091
(Assignee)

Updated

9 years ago
Assignee: joshmoz → mstange
(Assignee)

Comment 17

9 years ago
I'll work on this when bug 418454 lands (it changes some stuff about frame transparency).
Status: NEW → ASSIGNED
(Assignee)

Comment 18

9 years ago
Created attachment 334362 [details] [diff] [review]
WIP fix v0.1: Ask nsITheme if a themed frame is transparent, make the rounded corners draw inside the frame

This patch is on top of those in bug 450939 and bug 450944.
I haven't tested in on 10.4 yet, it might mess things up.
(Assignee)

Comment 19

9 years ago
The patch works on 10.4, too. Even there, HIThemeDrawMenuBackground draws outside the frame (i.e. the drawn rect extends 4px above and below the requested rect).

Comment 20

9 years ago
Do we really want it on 10.4?
(Assignee)

Comment 21

9 years ago
The patch doesn't result in rounded corners on 10.4, HIThemeDrawMenuBackground does its job quite well. :-)

In comment 19 I meant to say that it doesn't break 10.4, i.e. it doesn't change the context menu's size there, although we make the drawRect smaller.
(Assignee)

Comment 22

9 years ago
(In reply to comment #10)
> I assume this will also take care of the blurring that appears to go on behind
> menus on leopard?

It won't. And there's no way of doing that without using private, undocumented methods. :-(
(Assignee)

Comment 23

9 years ago
Created attachment 343058 [details] [diff] [review]
patch v1
Attachment #334362 - Attachment is obsolete: true
Attachment #343058 - Flags: superreview?(roc)
Attachment #343058 - Flags: review?(joshmoz)
Comment on attachment 343058 [details] [diff] [review]
patch v1

+    if (aTransparencyMode)
+      *aTransparencyMode = theme->GetWidgetTransparency(aDisp->mAppearance);

braces arond this non-control-flow statement
Attachment #343058 - Flags: superreview?(roc) → superreview+
(Assignee)

Comment 25

9 years ago
Comment on attachment 343058 [details] [diff] [review]
patch v1

This patch isn't ready. :(
I just tested it again and noticed that it eats the shadow of XUL popup menus...
Attachment #343058 - Attachment is obsolete: true
Attachment #343058 - Flags: review?(joshmoz)

Comment 26

9 years ago
(In reply to comment #22)
> (In reply to comment #10)
> > I assume this will also take care of the blurring that appeas to go on behind
> > menus on leopard?
> 
> It won't. And there's no way of doing that without using private, undocumented
> methods. :-(
If aero glass was possible, maybe this is possible too ? As i look at latest iTerm.app code (with has abbility to set blur for transparent background) in cocoa you need only set prepared window filter with blur radious.
(Assignee)

Updated

9 years ago
Attachment #343058 - Flags: review?(joshmoz)
(Assignee)

Updated

9 years ago
Attachment #343058 - Attachment is obsolete: false
(Assignee)

Comment 27

9 years ago
Created attachment 349939 [details] [diff] [review]
fix shadow bug

For some reason, mIsTransparent isn't set correctly on the view. I need to find out why that's the case, but for now this patch works.
Attachment #349939 - Flags: review?(roc)
(Assignee)

Comment 28

9 years ago
(In reply to comment #26)
iTerm.app uses CGSAddWindowFilter; that's the private function I was referring to.
Attachment #349939 - Flags: superreview+
Attachment #349939 - Flags: review?(roc)
Attachment #349939 - Flags: review+

Updated

8 years ago
Attachment #343058 - Flags: review?(joshmoz) → review+
(Assignee)

Comment 29

8 years ago
pushed: http://hg.mozilla.org/mozilla-central/rev/58f409bbc149
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Attachment #349939 - Flags: approval1.9.1+
Comment on attachment 349939 [details] [diff] [review]
fix shadow bug

a191=beltzner
(Assignee)

Comment 31

8 years ago
pushed to mozilla-1.9.1:
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/55582aea3232
Keywords: fixed1.9.1
(Assignee)

Updated

8 years ago
Depends on: 469683
(Assignee)

Updated

8 years ago
Depends on: 472734
Verified fix on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090129 Shiretoko/3.1b3pre Ubiquity/0.1.5
and 
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090129 Minefield/3.2a1pre

10.4 builds still show square corners as expected.
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1

Comment 33

8 years ago
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090218 Minefield/3.2a1pre


My PPC machines have square corners under Leopard.
Whiteboard: [radar:5430472] → [radar:5430472][polish-hard][polish-visual]
This bug's priority relative to the set of other polish bugs is:
P2 - Polish issue that is in a secondary interface, occasionally encountered, and is easily identifiable.

Context menus are a secondary interface, however this issue was widely reported on OS X as a polish problem.
Whiteboard: [radar:5430472][polish-hard][polish-visual] → [radar:5430472][polish-hard][polish-visual][polish-p2]
You need to log in before you can comment on or make changes to this bug.