mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 1395674 - Adding subviewbutton-nav class to menu-type toolbarbuttons and display the '>' in the overflow list. r=Gijs
MozReview-Commit-ID: I1pGXA3ecxT --HG-- extra : rebase_source : ebfd4dbc2191a921ea04f0fcf56270ad945c3e37
This commit is contained in:
parent
04725fe976
commit
f933fa62ca
@ -928,7 +928,7 @@
|
||||
hidden="true"
|
||||
tooltip="dynamic-shortcut-tooltip"/>
|
||||
|
||||
<toolbarbutton id="library-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
<toolbarbutton id="library-button" class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav"
|
||||
removable="true"
|
||||
onmousedown="PanelUI.showSubView('appMenu-libraryView', this, null, event);"
|
||||
closemenu="none"
|
||||
@ -1062,7 +1062,7 @@
|
||||
tooltip="dynamic-shortcut-tooltip"/>
|
||||
|
||||
<toolbarbutton id="bookmarks-menu-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav"
|
||||
type="menu"
|
||||
label="&bookmarksMenuButton2.label;"
|
||||
tooltip="dynamic-shortcut-tooltip"
|
||||
|
@ -1460,13 +1460,14 @@ var CustomizableUIInternal = {
|
||||
if (tooltip) {
|
||||
node.setAttribute("tooltiptext", tooltip);
|
||||
}
|
||||
node.setAttribute("class", "toolbarbutton-1 chromeclass-toolbar-additional");
|
||||
|
||||
let commandHandler = this.handleWidgetCommand.bind(this, aWidget, node);
|
||||
node.addEventListener("command", commandHandler);
|
||||
let clickHandler = this.handleWidgetClick.bind(this, aWidget, node);
|
||||
node.addEventListener("click", clickHandler);
|
||||
|
||||
let nodeClasses = ["toolbarbutton-1", "chromeclass-toolbar-additional"];
|
||||
|
||||
// If the widget has a view, and has view showing / hiding listeners,
|
||||
// hook those up to this widget.
|
||||
if (aWidget.type == "view") {
|
||||
@ -1477,12 +1478,16 @@ var CustomizableUIInternal = {
|
||||
// PanelUI relies on the .PanelUI-subView class to be able to show only
|
||||
// one sub-view at a time.
|
||||
viewNode.classList.add("PanelUI-subView");
|
||||
if (aWidget.source == CustomizableUI.SOURCE_BUILTIN) {
|
||||
nodeClasses.push("subviewbutton-nav");
|
||||
}
|
||||
this.ensureSubviewListeners(viewNode);
|
||||
} else {
|
||||
log.error("Could not find the view node with id: " + aWidget.viewId +
|
||||
", for widget: " + aWidget.id + ".");
|
||||
}
|
||||
}
|
||||
node.setAttribute("class", nodeClasses.join(" "));
|
||||
|
||||
if (aWidget.onCreated) {
|
||||
aWidget.onCreated(node);
|
||||
|
@ -473,6 +473,10 @@ photonpanelmultiview .panel-subview-body {
|
||||
height: calc(51px + 2.2em);
|
||||
}
|
||||
|
||||
toolbarpaletteitem[place=panel] > .toolbarbutton-1 {
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
/* Help SDK buttons fit in. */
|
||||
toolbarpaletteitem[place="palette"] > toolbarbutton[constrain-size="true"] > .toolbarbutton-icon,
|
||||
toolbarpaletteitem[place="palette"] > toolbarbutton[constrain-size="true"] > .toolbarbutton-badge-stack > .toolbarbutton-icon,
|
||||
@ -1718,6 +1722,21 @@ toolbaritem[overflowedItem=true],
|
||||
-moz-box-orient: horizontal;
|
||||
}
|
||||
|
||||
.widget-overflow-list .subviewbutton-nav:-moz-locale-dir(ltr)::after {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
.widget-overflow-list .subviewbutton-nav::after {
|
||||
margin-inline-start: 10px;
|
||||
-moz-context-properties: fill;
|
||||
content: url(chrome://browser/skin/back-12.svg);
|
||||
fill: GrayText;
|
||||
float: right;
|
||||
}
|
||||
|
||||
toolbarpaletteitem[place=panel] > .subviewbutton-nav::after {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.widget-overflow-list .toolbarbutton-1:not(.toolbarbutton-combined) > .toolbarbutton-text {
|
||||
text-align: start;
|
||||
padding-inline-start: .5em;
|
||||
|
Loading…
x
Reference in New Issue
Block a user