mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 404825 - "Bookmark folders in Personal Toolbar" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=roc a1.9=schrep]
This commit is contained in:
parent
b3a2ff4d39
commit
0b03813df8
@ -114,6 +114,15 @@ toolbarbutton.bookmark-item[open="true"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide icons for the container ("folder") items and use a dropmarker instead */
|
||||
.bookmark-item[container] > .toolbarbutton-menu-dropmarker {
|
||||
display: -moz-box !important;
|
||||
}
|
||||
|
||||
.bookmark-item[container] > .toolbarbutton-icon {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.bookmarks-toolbar-customize {
|
||||
display: none;
|
||||
max-width: 15em !important;
|
||||
|
@ -32,8 +32,8 @@
|
||||
// A dual toolbar button (e.g., a Back button with a dropdown)
|
||||
#define NS_THEME_TOOLBAR_DUAL_BUTTON 14
|
||||
|
||||
// The dropdown portion of a dual toolbar button
|
||||
#define NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN 15
|
||||
// The dropdown portion of a toolbar button
|
||||
#define NS_THEME_TOOLBAR_BUTTON_DROPDOWN 15
|
||||
|
||||
// A separator. Can be horizontal or vertical.
|
||||
#define NS_THEME_TOOLBAR_SEPARATOR 16
|
||||
|
@ -477,7 +477,7 @@ CSS_KEY(toolbar, toolbar)
|
||||
CSS_KEY(toolbarbutton, toolbarbutton)
|
||||
CSS_KEY(toolbargripper, toolbargripper)
|
||||
CSS_KEY(dualbutton, dualbutton)
|
||||
CSS_KEY(dualbutton-dropdown, dualbutton_dropdown)
|
||||
CSS_KEY(toolbarbutton-dropdown, toolbarbutton_dropdown)
|
||||
CSS_KEY(separator, separator)
|
||||
CSS_KEY(splitter, splitter)
|
||||
CSS_KEY(statusbar, statusbar)
|
||||
|
@ -188,7 +188,7 @@ const PRInt32 nsCSSProps::kAppearanceKTable[] = {
|
||||
eCSSKeyword_toolbarbutton, NS_THEME_TOOLBAR_BUTTON,
|
||||
eCSSKeyword_toolbargripper, NS_THEME_TOOLBAR_GRIPPER,
|
||||
eCSSKeyword_dualbutton, NS_THEME_TOOLBAR_DUAL_BUTTON,
|
||||
eCSSKeyword_dualbutton_dropdown, NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN,
|
||||
eCSSKeyword_toolbarbutton_dropdown, NS_THEME_TOOLBAR_BUTTON_DROPDOWN,
|
||||
eCSSKeyword_separator, NS_THEME_TOOLBAR_SEPARATOR,
|
||||
eCSSKeyword_splitter, NS_THEME_SPLITTER,
|
||||
eCSSKeyword_statusbar, NS_THEME_STATUSBAR,
|
||||
|
@ -123,11 +123,14 @@ toolbarbutton[checked="true"]:hover:active {
|
||||
/* ::::: toolbarbutton menu ::::: */
|
||||
|
||||
.toolbarbutton-menu-dropmarker {
|
||||
-moz-appearance: none !important;
|
||||
-moz-appearance: toolbarbutton-dropdown !important;
|
||||
list-style-image: none;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
border: none !important;
|
||||
background-color: transparent !important;
|
||||
padding: 0;
|
||||
width: auto;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.toolbarbutton-menu-dropmarker[disabled="true"] {
|
||||
@ -165,8 +168,10 @@ toolbarbutton[type="menu-button"][disabled="true"]:hover:active {
|
||||
border: none !important;
|
||||
background-color: transparent !important;
|
||||
padding: 3px;
|
||||
width: auto;
|
||||
-moz-appearance: dualbutton-dropdown !important;
|
||||
-moz-appearance: toolbarbutton-dropdown !important;
|
||||
list-style-image: none;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-dropmarker[disabled="true"] {
|
||||
|
@ -1430,6 +1430,31 @@ moz_gtk_option_menu_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
static gint
|
||||
moz_gtk_downarrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state)
|
||||
{
|
||||
GtkStyle* style;
|
||||
GtkStateType state_type = ConvertGtkState(state);
|
||||
GtkShadowType shadow_type = state->active ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
|
||||
GdkRectangle arrow_rect;
|
||||
|
||||
ensure_arrow_widget();
|
||||
style = gArrowWidget->style;
|
||||
|
||||
arrow_rect.x = rect->x + 1 + XTHICKNESS(style);
|
||||
arrow_rect.y = rect->y + 1 + YTHICKNESS(style);
|
||||
arrow_rect.width = MAX(1, rect->width - (arrow_rect.x - rect->x) * 2);
|
||||
arrow_rect.height = MAX(1, rect->height - (arrow_rect.y - rect->y) * 2);
|
||||
|
||||
TSOffsetStyleGCs(style, arrow_rect.x, arrow_rect.y);
|
||||
gtk_paint_arrow(style, drawable, state_type, shadow_type, cliprect,
|
||||
gArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
|
||||
arrow_rect.x, arrow_rect.y, arrow_rect.width, arrow_rect.height);
|
||||
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
static gint
|
||||
moz_gtk_dropdown_arrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
||||
@ -2384,6 +2409,7 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
|
||||
case MOZ_GTK_WINDOW:
|
||||
case MOZ_GTK_RESIZER:
|
||||
case MOZ_GTK_MENUARROW:
|
||||
case MOZ_GTK_TOOLBARBUTTON_ARROW:
|
||||
*left = *top = *right = *bottom = 0;
|
||||
return MOZ_GTK_SUCCESS;
|
||||
default:
|
||||
@ -2688,6 +2714,9 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
|
||||
return moz_gtk_menu_arrow_paint(drawable, rect, cliprect, state,
|
||||
direction);
|
||||
break;
|
||||
case MOZ_GTK_TOOLBARBUTTON_ARROW:
|
||||
return moz_gtk_downarrow_paint(drawable, rect, cliprect, state);
|
||||
break;
|
||||
case MOZ_GTK_CHECKMENUITEM:
|
||||
case MOZ_GTK_RADIOMENUITEM:
|
||||
return moz_gtk_check_menu_item_paint(drawable, rect, cliprect, state,
|
||||
|
@ -192,6 +192,8 @@ typedef enum {
|
||||
MOZ_GTK_MENUPOPUP,
|
||||
/* Paints the arrow of menuitems that contain submenus */
|
||||
MOZ_GTK_MENUARROW,
|
||||
/* Paints an arrow that points down */
|
||||
MOZ_GTK_TOOLBARBUTTON_ARROW,
|
||||
/* Paints items of menubar and popups. */
|
||||
MOZ_GTK_MENUITEM,
|
||||
MOZ_GTK_CHECKMENUITEM,
|
||||
|
@ -466,6 +466,9 @@ nsNativeThemeGTK::GetGtkWidgetAndState(PRUint8 aWidgetType, nsIFrame* aFrame,
|
||||
case NS_THEME_DROPDOWN_BUTTON:
|
||||
aGtkWidgetType = MOZ_GTK_DROPDOWN_ARROW;
|
||||
break;
|
||||
case NS_THEME_TOOLBAR_BUTTON_DROPDOWN:
|
||||
aGtkWidgetType = MOZ_GTK_TOOLBARBUTTON_ARROW;
|
||||
break;
|
||||
case NS_THEME_CHECKBOX_CONTAINER:
|
||||
aGtkWidgetType = MOZ_GTK_CHECKBUTTON_CONTAINER;
|
||||
break;
|
||||
@ -1166,7 +1169,7 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
|
||||
case NS_THEME_TOOLBAR:
|
||||
case NS_THEME_TOOLBAR_BUTTON:
|
||||
case NS_THEME_TOOLBAR_DUAL_BUTTON: // so we can override the border with 0
|
||||
// case NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN:
|
||||
case NS_THEME_TOOLBAR_BUTTON_DROPDOWN:
|
||||
case NS_THEME_TOOLBAR_SEPARATOR:
|
||||
case NS_THEME_TOOLBAR_GRIPPER:
|
||||
case NS_THEME_STATUSBAR:
|
||||
|
Loading…
Reference in New Issue
Block a user