Closed
Bug 404498
Opened 18 years ago
Closed 18 years ago
Improve GTK look of menu selection
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9beta2
People
(Reporter: micmon, Assigned: ispence)
References
Details
Attachments
(2 files, 2 obsolete files)
24.24 KB,
image/png
|
Details | |
6.29 KB,
patch
|
roc
:
review+
roc
:
superreview+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071022 Ubuntu/7.10 (gutsy) Firefox/2.0.0.8
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b2pre) Gecko/2007111904 Minefield/3.0b2pre
The selected menu looks a bit odd compared to native GTK. See screenshot.
Reproducible: Always
Reporter | ||
Comment 1•18 years ago
|
||
Assignee | ||
Comment 2•18 years ago
|
||
This implements NS_THEME_MENUBARITEM, which is specifically for GtkMenuItems inside GtkMenuBars.
It's not a huge patch,the only thing I'm not sure is if I'm allowed to add NS_THEME_MENUBARITEM since it's not already in the spec.
Comment 3•18 years ago
|
||
Comment on attachment 291084 [details] [diff] [review]
Implements NS_THEME_MENUBARITEM
I'm having a few remarks about this patch:
>+// menuitems in menubar appearance
>+#define NS_THEME_MENUBARITEM 221
> [...]
>+CSS_KEY(menubaritem, menubaritem)
> [...]
>+ eCSSKeyword_menubaritem, NS_THEME_MENUBARITEM,
> [...]
> menubar > menu[open] {
>+ -moz-appearance: menubaritem !important;
This is not needed: there is a way in nsNativeThemeGTK.cpp to check if a menu item is on a menubar (line 279 and further).
> ensure_menu_item_widget();
how do you want to ensure gMenuBarItemWidget is not NULL?
>+
>+ GtkWidget* item_widget;
this should be defined at the beginning of the function.
>+ case MOZ_GTK_MENUBARITEM:
>+ ensure_menu_bar_item_widget();
>+ w = gMenuBarItemWidget;
>+ break;
where is ensure_menu_bar_item_widget() defined?
Comment 4•18 years ago
|
||
(In reply to comment #3)
>
> >+ case MOZ_GTK_MENUBARITEM:
> >+ ensure_menu_bar_item_widget();
> >+ w = gMenuBarItemWidget;
> >+ break;
> where is ensure_menu_bar_item_widget() defined?
>
Sorry, forget about this, I found it :)
Assignee | ||
Comment 5•18 years ago
|
||
A whole lot simpler of a patch.
Attachment #291084 -
Attachment is obsolete: true
Updated•18 years ago
|
Assignee: nobody → ispence
Comment 6•18 years ago
|
||
Comment on attachment 291090 [details] [diff] [review]
Doesn't implement NS_ anything, just works
Please remember to request review on your patches.
Attachment #291090 -
Flags: superreview?(roc)
Attachment #291090 -
Flags: review?(roc)
Updated•18 years ago
|
Status: NEW → ASSIGNED
Component: OS Integration → Widget: Gtk
Product: Firefox → Core
QA Contact: os.integration → gtk
Version: unspecified → Trunk
+ *aWidgetFlags = 1;
} else {
aState->inHover = CheckBooleanAttr(aFrame, nsWidgetAtoms::mozmenuactive);
+ *aWidgetFlags = 0;
Use a #define here, something new if necessary, e.g. MOZ_TOPLEVEL_MENU_ITEM. I believe all the other flags have #defined values.
Otherwise looks great, thanks!!!
Assignee | ||
Comment 8•18 years ago
|
||
Updated to use a bitwise flag. I couldn't think of any other reasons a menuitem would need a flag, but I figured better safe than sorry.
Attachment #291090 -
Attachment is obsolete: true
Attachment #291308 -
Flags: superreview?(roc)
Attachment #291308 -
Flags: review?(roc)
Attachment #291090 -
Flags: superreview?(roc)
Attachment #291090 -
Flags: review?(roc)
Attachment #291308 -
Flags: superreview?(roc)
Attachment #291308 -
Flags: superreview+
Attachment #291308 -
Flags: review?(roc)
Attachment #291308 -
Flags: review+
Comment 10•18 years ago
|
||
Comment on attachment 291308 [details] [diff] [review]
Updated to use defined constant
Making Firefox on Linux better, one patch at a time.
Attachment #291308 -
Flags: approval1.9?
Comment 11•18 years ago
|
||
Comment on attachment 291308 [details] [diff] [review]
Updated to use defined constant
Rockin! Nice work..
Attachment #291308 -
Flags: approval1.9? → approval1.9+
Updated•18 years ago
|
Keywords: checkin-needed
Comment 12•18 years ago
|
||
Checking in widget/src/gtk2/gtk2drawing.c;
/cvsroot/mozilla/widget/src/gtk2/gtk2drawing.c,v <-- gtk2drawing.c
new revision: 1.47; previous revision: 1.46
done
Checking in widget/src/gtk2/gtkdrawing.h;
/cvsroot/mozilla/widget/src/gtk2/gtkdrawing.h,v <-- gtkdrawing.h
new revision: 1.40; previous revision: 1.39
done
Checking in widget/src/gtk2/nsNativeThemeGTK.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp,v <-- nsNativeThemeGTK.cpp
new revision: 1.117; previous revision: 1.116
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M10
You need to log in
before you can comment on or make changes to this bug.
Description
•