Bug 893849 - search box should fill entire width of panel, part 1: change class name, apply to search box, r=mikedeboer

This commit is contained in:
Gijs Kruitbosch 2013-10-10 19:43:58 +02:00
Родитель 19e128e29d
Коммит 1b6371d9f3
6 изменённых файлов: 8 добавлений и 9 удалений

Просмотреть файл

@ -671,7 +671,7 @@
</toolbaritem>
<toolbaritem id="search-container" title="&searchItem.title;"
align="center" class="chromeclass-toolbar-additional"
align="center" class="chromeclass-toolbar-additional panel-wide-item"
customizableui-areatype="toolbar"
flex="100" persist="width" removable="true">
<searchbar id="searchbar" flex="1"/>

Просмотреть файл

@ -18,7 +18,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "CharsetManager",
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
const kWidePanelItemClass = "panel-combined-item";
const kWidePanelItemClass = "panel-wide-item";
let gModuleName = "[CustomizableWidgets]";
#include logging.js

Просмотреть файл

@ -1261,11 +1261,11 @@ CustomizeMode.prototype = {
this._removePanelCustomizationPlaceholders();
let doc = this.document;
let contents = this.panelUIContents;
let visibleCombinedButtons = contents.querySelectorAll("toolbarpaletteitem:not([hidden]) > .panel-combined-item");
let visibleWideItems = contents.querySelectorAll("toolbarpaletteitem:not([hidden]) > .panel-wide-item");
let visibleChildren = contents.querySelectorAll("toolbarpaletteitem:not([hidden])");
// TODO(bug 885578): Still doesn't handle a hole when there is a wide
// widget located at the bottom of the panel.
let hangingItems = (visibleChildren.length - visibleCombinedButtons.length) % kColumnsInMenuPanel;
let hangingItems = (visibleChildren.length - visibleWideItems.length) % kColumnsInMenuPanel;
let newPlaceholders = kColumnsInMenuPanel;
let visiblePlaceholders = kColumnsInMenuPanel - hangingItems;
while (newPlaceholders--) {

Просмотреть файл

@ -24,7 +24,7 @@ let gWideWidgets = new Set();
let gSeenWidgets = new Set();
// The class by which we recognize wide widgets:
const kWidePanelItemClass = "panel-combined-item";
const kWidePanelItemClass = "panel-wide-item";
// TODO(bug 885574): Merge this constant with the one in CustomizeMode.jsm,
// maybe just use a pref for this.

Просмотреть файл

@ -63,7 +63,7 @@ toolbarpaletteitem[place="palette"] > #zoom-controls > #zoom-out-button {
padding-right: 12px;
}
.panel-combined-item[customizableui-areatype="menu-panel"] > toolbarbutton,
.panel-wide-item[customizableui-areatype="menu-panel"] > toolbarbutton,
toolbarbutton[customizableui-areatype="menu-panel"] {
margin: 0;
}

Просмотреть файл

@ -158,9 +158,8 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton,
padding-right: .5em;
}
#widget-overflow-list > #edit-controls,
#widget-overflow-list > #zoom-controls,
.panel-combined-item[customizableui-areatype="menu-panel"] {
.panel-wide-item.overflowedItem,
.panel-wide-item[customizableui-areatype="menu-panel"] {
-moz-box-align: stretch;
padding: .5em 0 .5em;
}