зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1389094 - Increase height of sidebar search bar and tree items in touch mode. r=dao
MozReview-Commit-ID: HxT3eNHImyz --HG-- extra : rebase_source : eff12ac335b7908ded5eca9810aa41251d9eabdb
This commit is contained in:
Родитель
695eafbf83
Коммит
4a8b35e00c
|
@ -5717,17 +5717,29 @@ var gUIDensity = {
|
|||
mode = this.getCurrentDensity().mode;
|
||||
}
|
||||
|
||||
let doc = document.documentElement;
|
||||
switch (mode) {
|
||||
case this.MODE_COMPACT:
|
||||
doc.setAttribute("uidensity", "compact");
|
||||
break;
|
||||
case this.MODE_TOUCH:
|
||||
doc.setAttribute("uidensity", "touch");
|
||||
break;
|
||||
default:
|
||||
doc.removeAttribute("uidensity");
|
||||
break;
|
||||
let docs = [
|
||||
document.documentElement,
|
||||
SidebarUI.browser.contentDocument.documentElement,
|
||||
];
|
||||
for (let doc of docs) {
|
||||
switch (mode) {
|
||||
case this.MODE_COMPACT:
|
||||
doc.setAttribute("uidensity", "compact");
|
||||
break;
|
||||
case this.MODE_TOUCH:
|
||||
doc.setAttribute("uidensity", "touch");
|
||||
break;
|
||||
default:
|
||||
doc.removeAttribute("uidensity");
|
||||
break;
|
||||
}
|
||||
}
|
||||
let tree = SidebarUI.browser.contentDocument.querySelector(".sidebar-placesTree");
|
||||
if (tree) {
|
||||
// Tree items don't update their styles without changing some property on the
|
||||
// parent tree element, like background-color or border. See bug 1407399.
|
||||
tree.style.border = "1px";
|
||||
tree.style.border = "";
|
||||
}
|
||||
|
||||
TabsInTitlebar.updateAppearance(true);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||
window.top.gUIDensity.update();
|
||||
|
||||
var SidebarUtils = {
|
||||
handleTreeClick: function SU_handleTreeClick(aTree, aEvent, aGutterSelect) {
|
||||
|
|
|
@ -51,6 +51,11 @@
|
|||
min-height: 24px;
|
||||
}
|
||||
|
||||
:root[uidensity=touch] #search-box,
|
||||
:root[uidensity=touch] .sidebar-placesTreechildren::-moz-tree-row {
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.sidebar-placesTreechildren::-moz-tree-cell(leaf) ,
|
||||
.sidebar-placesTreechildren::-moz-tree-image(leaf) {
|
||||
cursor: pointer;
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
font-size: 1.0909rem;
|
||||
}
|
||||
|
||||
:root[uidensity=touch] .sidebar-placesTreechildren::-moz-tree-row {
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.sidebar-placesTree {
|
||||
-moz-appearance: -moz-mac-source-list;
|
||||
-moz-font-smoothing-background-color: -moz-mac-source-list;
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
:root[uidensity=touch] #search-box,
|
||||
:root[uidensity=touch] .sidebar-placesTreechildren::-moz-tree-row {
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.sidebar-placesTreechildren::-moz-tree-cell,
|
||||
.sidebar-placesTreechildren::-moz-tree-twisty {
|
||||
padding: 0 4px;
|
||||
|
|
Загрузка…
Ссылка в новой задаче