Bug 1197946 - Remove dropdown buttons/icons in sidebar mode. r=jryans

This commit is contained in:
Jennifer Fong 2015-08-24 13:47:00 -04:00
parent e9b531570f
commit a48ff64fe9
2 changed files with 22 additions and 0 deletions

View File

@ -77,6 +77,14 @@ let UI = {
projectList = new ProjectList(window, window);
if (projectList.sidebarsEnabled) {
ProjectPanel.toggleSidebar();
// TODO: Remove if/when dropdown layout is removed.
let toolbarNode = document.querySelector("#main-toolbar");
toolbarNode.classList.add("sidebar-layout");
let projectNode = document.querySelector("#project-panel-button");
projectNode.setAttribute("hidden", "true");
let runtimeNode = document.querySelector("#runtime-panel-button");
runtimeNode.setAttribute("hidden", "true");
}
runtimeList = new RuntimeList(window, window);
if (runtimeList.sidebarsEnabled) {
@ -499,8 +507,14 @@ let UI = {
if (AppManager.connected) {
runtimePanelButton.setAttribute("active", "true");
if (projectList.sidebarsEnabled) {
runtimePanelButton.removeAttribute("hidden");
}
} else {
runtimePanelButton.removeAttribute("active");
if (projectList.sidebarsEnabled) {
runtimePanelButton.setAttribute("hidden", "true");
}
}
projectPanelCmd.removeAttribute("disabled");

View File

@ -16,6 +16,14 @@
padding: 0 12px;
}
/*
* Hide dropdown anchor when we switch to the sidebar layout.
* TODO: Remove if/when we remove the dropdown layout permanently.
*/
#main-toolbar.sidebar-layout .panel-button-anchor {
display: none;
}
#action-buttons-container {
-moz-box-pack: center;
height: 50px;