Closed Bug 118025 Opened 23 years ago Closed 15 years ago

NS_THEME_MENU* implementations (Mac)

Categories

(Core Graveyard :: Skinability, enhancement)

PowerPC
macOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: ian, Assigned: asaf)

References

Details

Attachments

(2 files)

This covers the implementation of NS_THEME_MENUBAR, NS_THEME_MENU_POPUP and
NS_THEME_MENUITEM for XUL menus on Mac.

Note: NS_THEME_MENUBAR may not be appropriate for this platform.
Blocks: 34572, 117584
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
No longer blocks: 117584
Blocks: 117584
no way, no day.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
any comments on the bugs which this blocks?

are there better alternatives, or should they be WONTFIX'ed as well?

    bug 34572
    bug 117584

-matt
Don't we need this to make xul popup menus look like native menus, or is that
not the plan?
oh duh, i guess we need this for menu bg's. 

::DrawThemeMenuBackground().

my bad.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
where did 099 go? was i asleep? was i dreaming? this is not my beautiful house.
this is not my beautiful wife.
Target Milestone: mozilla0.9.9 → mozilla1.0
Keywords: topembed
wrong keyword
Status: REOPENED → ASSIGNED
Keywords: topembednsbeta1
nsbeta1- per ADT triage team
Keywords: nsbeta1nsbeta1-
i would like this for rtm. how do i mark that?
Target Milestone: mozilla1.0 → mozilla1.0.1
ADT sez we're planning using nsbeta1 all the way through
then this should be +
Keywords: nsbeta1-nsbeta1
How horrible will things look if it isn't implemented? 
Keywords: nsbeta1nsbeta1+
Target Milestone: mozilla1.0.1 → Future
QA Contact: pmac → gbush
I'm not passing the right *menu* rect to DrawThemeMenuItem, but 1) So far, i'm
not able to get this rect 2) It seems it doesn't affect anything.

We need this patch in order to improve the menus in pinstripe (which hardcodes
menubackgorund and the hover-color).
Attachment #172744 - Flags: superreview?(sfraser_bugs)
Attachment #172744 - Flags: review?(pinkerton)
The most important improvment - we now follow the theme hover color (instead of
hard-coding it in the stylesheet).
Attachment #172745 - Flags: review?(webmail)
Comment on attachment 172744 [details] [diff] [review]
partial patch (see comment 15)

looks ok to me. not sure why i couldn't get this working a few years back.

r=pink
Attachment #172744 - Flags: review?(pinkerton) → review+
Comment on attachment 172744 [details] [diff] [review]
partial patch (see comment 15)

I'll add the missing setthemebackround calls (for calls) on checkin
Attachment #172744 - Attachment description: partial patch → partial patch (see comment 15)
Attachment #172745 - Flags: review?(webmail) → review+
simon! :)
Comment on attachment 172744 [details] [diff] [review]
partial patch (see comment 15)

>Index: gfx/src/mac/nsNativeThemeMac.cpp

>+void
>+nsNativeThemeMac::DrawMenu ( const Rect& inBoxRect, PRBool inIsDisabled )
>+{
>+  ::EraseRect(&inBoxRect);

Should you set the background color before calling EraseRect()?

>+  ThemeMenuType menuType = inIsDisabled ? kThemeMenuTypeInactive : kThemeMenuTypePopUp;
>+  ::DrawThemeMenuBackground(&inBoxRect, menuType);
>+}
>+

>+  // XXX: pass the right menu rect!
>+  ::DrawThemeMenuItem(&inBoxRect, &inBoxRect, inBoxRect.top,
>+                      inBoxRect.bottom, menuItemState, itemType, NULL, 0);

Does the commment mean that this still needs fixing?

sr=sfraser with those addressed.
Attachment #172744 - Flags: superreview?(sfraser_bugs) → superreview+
(In reply to comment #17)
> (From update of attachment 172744 [details] [diff] [review] [edit])
> >Index: gfx/src/mac/nsNativeThemeMac.cpp
> 
> >+void
> >+nsNativeThemeMac::DrawMenu ( const Rect& inBoxRect, PRBool inIsDisabled )
> >+{
> >+  ::EraseRect(&inBoxRect);
> 
> Should you set the background color before calling EraseRect()?

yeah, as i mentioned in comment 15. fixing on checkin.

> >+  ThemeMenuType menuType = inIsDisabled ? kThemeMenuTypeInactive :
kThemeMenuTypePopUp;
> >+  ::DrawThemeMenuBackground(&inBoxRect, menuType);
> >+}
> >+
> 
> >+  // XXX: pass the right menu rect!
> >+  ::DrawThemeMenuItem(&inBoxRect, &inBoxRect, inBoxRect.top,
> >+                      inBoxRect.bottom, menuItemState, itemType, NULL, 0);
> 
> Does the commment mean that this still needs fixing?

Apparently, the Appearance Manager (on OS X) ignores the menu rect. Anyway yes;
and I'll probably address this, in this bug, in the 1.9 cycle.
checked in those, leaving open for further work.
Blocks: 235031
Product: Core → Core Graveyard
Mano, is this bug still relevant for anything (in which case it should move from the Graveyard), or should we just call it FIXED?
Assignee: mikepinkerton → mano
QA Contact: agracebush → skinability
Status: ASSIGNED → RESOLVED
Closed: 23 years ago15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: