From cf7d4f59f9c990696c4ed8d1160c556a5dce315c Mon Sep 17 00:00:00 2001 From: "varga%netscape.com" Date: Sat, 18 Jan 2003 20:55:19 +0000 Subject: [PATCH] Putting toolbar grippies back in. Bug 175091. Original bug for removing them was 112534. Please see the discussion in those 2 bugs before complaining or filling new bug reports! r=caillon,a=UE team --- .../resources/skin/classic/panelset.css | 8 + .../resources/skin/modern/panelset.css | 4 + .../resources/content/MsgComposeCommands.js | 17 +- themes/classic/editor/EdImageMap.css | 4 + themes/classic/global/mac/toolbar.css | 49 ++++ themes/classic/global/win/toolbar.css | 49 ++++ themes/modern/communicator/toolbar.css | 31 +++ .../communicator/toolbar/toolbarBindings.xml | 10 + themes/modern/editor/editorFormatToolbar.css | 5 + themes/modern/global/toolbar.css | 61 +++++ .../messengercompose/messengercompose.css | 7 + themes/modern/navigator/navigator.css | 9 + xpfe/browser/resources/content/navigator.xul | 6 +- .../resources/content/bindings/toolbar.xml | 233 ++++++++++++++++++ xpfe/global/resources/content/fullScreen.js | 6 +- xpfe/global/resources/content/xul.css | 9 +- 16 files changed, 499 insertions(+), 9 deletions(-) diff --git a/extensions/inspector/resources/skin/classic/panelset.css b/extensions/inspector/resources/skin/classic/panelset.css index d2fce6ff3264..e82f1850bcd8 100644 --- a/extensions/inspector/resources/skin/classic/panelset.css +++ b/extensions/inspector/resources/skin/classic/panelset.css @@ -64,6 +64,10 @@ panel[disabled="true"] > .viewer-pane-box-1 { border-right: none; } +.viewer-pane-header > toolbargrippy { + display: none; +} + .viewer-pane-header > .toolbar-holder { border-bottom: none; } @@ -82,3 +86,7 @@ panel[disabled="true"] > .viewer-pane-box-1 { border-bottom: none; } +.viewer-pane-header > toolbargrippy { + display: none; +} + diff --git a/extensions/inspector/resources/skin/modern/panelset.css b/extensions/inspector/resources/skin/modern/panelset.css index 615843b4ae25..d88d4b019bc8 100644 --- a/extensions/inspector/resources/skin/modern/panelset.css +++ b/extensions/inspector/resources/skin/modern/panelset.css @@ -60,6 +60,10 @@ domi-panel[disabled="true"] > .viewer-pane-box-1 { display: none; } +.viewer-pane-header > toolbargrippy { + display: none; +} + .viewer-pane-toolbox { border-top: none; border-bottom: none; diff --git a/mailnews/compose/resources/content/MsgComposeCommands.js b/mailnews/compose/resources/content/MsgComposeCommands.js index c5e7c7f0625c..74ce45a9346b 100644 --- a/mailnews/compose/resources/content/MsgComposeCommands.js +++ b/mailnews/compose/resources/content/MsgComposeCommands.js @@ -2937,6 +2937,15 @@ function GetMsgHeadersToolbarElement() return gMsgHeadersToolbarElement; } +function IsMsgHeadersToolbarCollapsed() +{ + var element = GetMsgHeadersToolbarElement(); + if(element) + return(element.getAttribute('moz-collapsed') == "true"); + + return(0); +} + function WhichElementHasFocus() { var msgIdentityElement = GetMsgIdentityElement(); @@ -2978,7 +2987,9 @@ function SwitchElementFocus(event) if (event && event.shiftKey) { - if (focusedElement == gMsgAddressingWidgetTreeElement) + if (IsMsgHeadersToolbarCollapsed()) + SetMsgBodyFrameFocus(); + else if (focusedElement == gMsgAddressingWidgetTreeElement) SetMsgIdentityElementFocus(); else if (focusedElement == gMsgIdentityElement) SetMsgBodyFrameFocus(); @@ -2998,7 +3009,9 @@ function SwitchElementFocus(event) } else { - if (focusedElement == gMsgAddressingWidgetTreeElement) + if (IsMsgHeadersToolbarCollapsed()) + SetMsgBodyFrameFocus(); + else if (focusedElement == gMsgAddressingWidgetTreeElement) SetMsgSubjectElementFocus(); else if (focusedElement == gMsgSubjectElement) { diff --git a/themes/classic/editor/EdImageMap.css b/themes/classic/editor/EdImageMap.css index 6c7a37df93c6..5bc41a4292bb 100644 --- a/themes/classic/editor/EdImageMap.css +++ b/themes/classic/editor/EdImageMap.css @@ -46,6 +46,10 @@ toolbar#toolbox button.tool { color: inherit; } +toolbar.toolbox > toolbargrippy { + visibility: collapse; +} + #pointerButton { list-style-image:url("chrome://editor/skin/images/Map_pointerTool.gif"); } diff --git a/themes/classic/global/mac/toolbar.css b/themes/classic/global/mac/toolbar.css index 73239620624d..68c28633a4ef 100644 --- a/themes/classic/global/mac/toolbar.css +++ b/themes/classic/global/mac/toolbar.css @@ -54,6 +54,55 @@ menubar { border-bottom: 1px solid ThreeDShadow; } +/* ::::: toolbargrippy ::::: */ + +toolbargrippy { + -moz-box-orient: vertical; + -moz-box-align: center; + border-left: 1px solid ThreeDHighlight; + border-top: 1px solid ThreeDHighlight; + border-right: 1px solid ThreeDShadow; + border-bottom: 1px solid ThreeDShadow; + width: 10px; + padding: 2px 1px; + list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow.gif"); +} + +toolbargrippy:hover { + background-color: #CCCCFF; +} + +.toolbargrippy-texture { + margin-top: 2px; + width: 6px; + background: url("chrome://global/skin/toolbar/tbgrip-texture.gif"); +} + +/* ::::: collapsed tray and grippies ::::: */ + +toolbargrippy[tbgrippy-collapsed="true"] { + -moz-box-orient: horizontal; + border-left: 1px solid ThreeDHighlight; + border-top: 1px solid ThreeDHighlight; + border-right: 1px solid ThreeDShadow; + border-bottom: 1px solid ThreeDShadow; + width: 40px; + height: 10px; + padding: 1px 2px; + list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow-clps.gif"); +} + +toolbargrippy[tbgrippy-collapsed="true"] > .toolbargrippy-texture { + margin-top: 0; + margin-left: 2px; + width: 0px; + height: 6px; +} + +.collapsed-tray-spacer { + border-bottom: 1px solid ThreeDShadow; +} + /* ::::: toolbarseparator ::::: */ toolbarseparator { diff --git a/themes/classic/global/win/toolbar.css b/themes/classic/global/win/toolbar.css index 9631acdefce3..aa20a7f25172 100644 --- a/themes/classic/global/win/toolbar.css +++ b/themes/classic/global/win/toolbar.css @@ -52,6 +52,55 @@ menubar { border-bottom: 1px solid ThreeDShadow; } +/* ::::: toolbargrippy ::::: */ + +toolbargrippy { + -moz-box-orient: vertical; + -moz-box-align: center; + border-left: 1px solid ThreeDHighlight; + border-top: 1px solid ThreeDHighlight; + border-right: 1px solid ThreeDShadow; + border-bottom: 1px solid ThreeDShadow; + width: 10px; + padding: 2px 1px; + list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow.gif"); +} + +toolbargrippy:hover { + background-color: #CCCCFF; +} + +.toolbargrippy-texture { + margin-top: 2px; + width: 6px; + background: url("chrome://global/skin/toolbar/tbgrip-texture.gif"); +} + +/* ::::: collapsed tray and grippies ::::: */ + +toolbargrippy[tbgrippy-collapsed="true"] { + -moz-box-orient: horizontal; + border-left: 1px solid ThreeDHighlight; + border-top: 1px solid ThreeDHighlight; + border-right: 1px solid ThreeDShadow; + border-bottom: 1px solid ThreeDShadow; + width: 40px; + height: 10px; + padding: 1px 2px; + list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow-clps.gif"); +} + +toolbargrippy[tbgrippy-collapsed="true"] > .toolbargrippy-texture { + margin-top: 0; + margin-left: 2px; + width: 0px; + height: 6px; +} + +.collapsed-tray-spacer { + border-bottom: 1px solid ThreeDShadow; +} + /* ::::: toolbarseparator ::::: */ toolbarseparator { diff --git a/themes/modern/communicator/toolbar.css b/themes/modern/communicator/toolbar.css index d8760f901918..4f838929a380 100644 --- a/themes/modern/communicator/toolbar.css +++ b/themes/modern/communicator/toolbar.css @@ -73,6 +73,37 @@ display: none; } +/* ::::: toolbargrippy ::::: */ + +.toolbar-primary-grippy { + -moz-binding: url("chrome://communicator/skin/toolbar/toolbarBindings.xml#toolbargrippy-primary"); + border: none; + background: url("chrome://communicator/skin/toolbar/prtb-grip-mid.gif") repeat-y; + list-style-image: url("chrome://communicator/skin/toolbar/prtb-grip-btm.gif"); +} + +.toolbar-primary-grippy > .toolbargrippy-texture { + width: 13px; + height: 0px; + list-style-image: url("chrome://communicator/skin/toolbar/prtb-grip-top.gif"); +} + +.toolbar-primary-grippy > .toolbargrippy-arrow { + margin: 0px; + width: 13px; + height: 10px; + list-style-image: inherit; +} + +.toolbar-primary-grippy:hover:active { + background-image: url("chrome://communicator/skin/toolbar/prtb-grip-mid-act.gif"); + list-style-image: url("chrome://communicator/skin/toolbar/prtb-grip-btm-act.gif"); +} + +.toolbar-primary-grippy:hover:active > .toolbargrippy-texture { + list-style-image: url("chrome://communicator/skin/toolbar/prtb-grip-top-act.gif"); +} + /* ::::: toolbar-primary separator ::::: */ .toolbarseparator-primary { diff --git a/themes/modern/communicator/toolbar/toolbarBindings.xml b/themes/modern/communicator/toolbar/toolbarBindings.xml index 9c2ac8967a07..611214e8262f 100644 --- a/themes/modern/communicator/toolbar/toolbarBindings.xml +++ b/themes/modern/communicator/toolbar/toolbarBindings.xml @@ -8,6 +8,8 @@ + @@ -17,4 +19,12 @@ + + + + + + + diff --git a/themes/modern/editor/editorFormatToolbar.css b/themes/modern/editor/editorFormatToolbar.css index a685fe53e4d2..140ce33538ef 100644 --- a/themes/modern/editor/editorFormatToolbar.css +++ b/themes/modern/editor/editorFormatToolbar.css @@ -43,6 +43,7 @@ background: url("chrome://global/skin/toolbar/tb-mid.gif") #C7D0D9 repeat-x top; } +#FormatToolbar > toolbargrippy, #FormatToolbar > .toolbar-holder { border-top: 1px solid #CED6DD; border-right: 1px solid #95A0AD; @@ -50,6 +51,10 @@ border-left: 1px solid #DAE3ED; } +#FormatToolbar > toolbargrippy:hover:active { + border-color: #67737E; +} + /* ::::: formatting buttons ::::: */ #FormatToolbar > toolbarbutton { diff --git a/themes/modern/global/toolbar.css b/themes/modern/global/toolbar.css index e4c41114644a..aa112bbcbc20 100644 --- a/themes/modern/global/toolbar.css +++ b/themes/modern/global/toolbar.css @@ -80,6 +80,67 @@ menubar > .toolbar-holder { border-left: 1px solid #EEF4FC; } +/* ::::: toolbargrippy ::::: */ + +toolbargrippy { + -moz-box-orient: vertical; + -moz-box-align: center; + -moz-box-pack: end; + -moz-box-direction: reverse; + border-top: 1px solid #EEF0F3; + border-right: 1px solid #86929E; + border-bottom: 1px solid #86929E; + border-left: 1px solid #EEF0F3; + list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow.gif"); +} + +toolbargrippy:hover:active { + border-color: #67737E; + background-color: #9DA9B6; + list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow-act.gif"); +} + +.toolbargrippy-arrow { + margin: 0px 1px 3px 1px; + width: 8px; + height: 5px; +} + +/* ::::: menubar grippy ::::: */ + +menubar > toolbargrippy { + border-top: 1px solid #EBF4FF; + border-right: 1px solid #B9BFC7; + border-bottom: 1px solid #B9BFC7; + border-left: 1px solid #F4FAFF; + background-color: #DDE3EB; + list-style-image: url("chrome://global/skin/toolbar/mbgrip-arrow.gif"); +} + +/* ::::: collapsed toolbargrippy and tray ::::: */ + +toolbargrippy[tbgrippy-collapsed="true"] { + -moz-box-orient: horizontal; + -moz-box-pack: start; + -moz-box-direction: normal; + width: 40px; + list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow-clps.gif"); +} + +toolbargrippy[tbgrippy-collapsed="true"] > .toolbargrippy-arrow { + margin: 1px 0px 1px 3px; + width: 5px; + height: 8px; +} + +toolbargrippy[tbgrippy-collapsed="true"]:hover:active > .toolbargrippy-arrow { + list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow-clps-act.gif"); +} + +.collapsed-tray-holder { + background-color: #C7D0D9; +} + /* ::::: toolbarseparator ::::: */ toolbarseparator { diff --git a/themes/modern/messenger/messengercompose/messengercompose.css b/themes/modern/messenger/messengercompose/messengercompose.css index 3628a0fecac0..f18fc5824cc9 100644 --- a/themes/modern/messenger/messengercompose/messengercompose.css +++ b/themes/modern/messenger/messengercompose/messengercompose.css @@ -148,7 +148,9 @@ background: url("chrome://global/skin/toolbar/tb-mid.gif") #C7D0D9 repeat-x top; } +#MsgHeadersToolbar > toolbargrippy, #MsgHeadersToolbar > .toolbar-holder, +#FormatToolbar > toolbargrippy, #FormatToolbar > .toolbar-holder { border-top: 1px solid #CED6DD; border-right: 1px solid #95A0AD; @@ -156,6 +158,11 @@ border-left: 1px solid #DAE3ED; } +#MsgHeadersToolbar > toolbargrippy:hover:active, +#FormatToolbar > toolbargrippy:hover:active { + border-color: #67737E; +} + .toolbox-top { border-bottom: none; } diff --git a/themes/modern/navigator/navigator.css b/themes/modern/navigator/navigator.css index ef562985cc8d..d25711e4c217 100644 --- a/themes/modern/navigator/navigator.css +++ b/themes/modern/navigator/navigator.css @@ -248,6 +248,10 @@ -moz-box-align: center; } +#nav-bar[toolbarmode="small"] > .toolbar-primary-grippy { + display: none; +} + #nav-bar[toolbarmode="small"] > .toolbar-primary-holder { background: #D0D7DF; } @@ -468,6 +472,7 @@ background: url("chrome://global/skin/toolbar/tb-mid.gif") #C7D0D9 repeat-x top; } +#PersonalToolbar > toolbargrippy, #PersonalToolbar > .toolbar-holder { border-top: 1px solid #CED6DD; border-right: 1px solid #95A0AD; @@ -475,6 +480,10 @@ border-left: 1px solid #DAE3ED; } +#PersonalToolbar > toolbargrippy:hover:active { + border-color: #67737E; +} + #home-button { list-style-image: url("chrome://communicator/skin/bookmarks/home.gif"); } diff --git a/xpfe/browser/resources/content/navigator.xul b/xpfe/browser/resources/content/navigator.xul index 992402e1a78e..14de8a685721 100644 --- a/xpfe/browser/resources/content/navigator.xul +++ b/xpfe/browser/resources/content/navigator.xul @@ -124,9 +124,9 @@ Contributor(s): - + - @@ -237,7 +237,7 @@ Contributor(s): - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 ? boxObject.height : 23; + var height = boxObject.width > 10 ? boxObject.width : 12; + var styleString = "width: " + width + "px; height: " + height + "px;"; + collapsedGrippy.setAttribute("style", styleString); + collapsedGrippy.setAttribute("tooltiptext", aToolbar.getAttribute("grippytooltiptext")); + collapsedGrippy.setAttribute("id", "moz_tb_collapsed_" + aToolbar.id); + collapsedGrippy.setAttribute("moz_grippy_collapsed", "true"); + collapsedGrippy.setAttribute("tbgrippy-collapsed", "true"); + var collapsedTrayHolder = this.findNodeByAttribute("tbattr", "collapsed-tray-holder"); + if (collapsedTrayHolder.getAttribute("moz-collapsed") == "true") + collapsedTrayHolder.removeAttribute("moz-collapsed"); + this.findNodeByAttribute("tbattr", "collapsed-tray").appendChild(collapsedGrippy); + collapsedGrippy = document.getElementById("moz_tb_collapsed_" + aToolbar.id); + } + } + catch (e) { + throw e; + } + ]]> + + + + + + return (this.hasAttribute("deferattached") ? "true" : "false"); + + + if (val) + this.setAttribute("deferattached", "true"); + else + this.removeAttribute("deferattached"); + return val; + + + + + + + + + + + + + + + + + + + + + @@ -92,6 +237,8 @@ + @@ -106,9 +253,95 @@ ]]> + + + + + + + + + + + + + + + + + + + + + + return this.hasAttribute("moz_grippy_collapsed"); + + + if (val) + this.setAttribute("moz_grippy_collapsed", "true"); + else + this.removeAttribute("moz_grippy_collapsed"); + return val; + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xpfe/global/resources/content/fullScreen.js b/xpfe/global/resources/content/fullScreen.js index db2ba6520990..2c60a3ab6def 100644 --- a/xpfe/global/resources/content/fullScreen.js +++ b/xpfe/global/resources/content/fullScreen.js @@ -57,10 +57,12 @@ var FullScreen = if (els[i].getAttribute("fullscreentoolbar") == "true") { this.setToolbarButtonMode(els[i], aShow ? "" : "small"); } else { + // use moz-collapsed so it doesn't persist hidden/collapsed, + // so that new windows don't have missing toolbars if (aShow) - els[i].removeAttribute("collapsed"); + els[i].removeAttribute("moz-collapsed"); else - els[i].setAttribute("collapsed", "true"); + els[i].setAttribute("moz-collapsed", "true"); } } diff --git a/xpfe/global/resources/content/xul.css b/xpfe/global/resources/content/xul.css index 8bc8e5007ff0..4d5d92a38c3b 100644 --- a/xpfe/global/resources/content/xul.css +++ b/xpfe/global/resources/content/xul.css @@ -23,7 +23,8 @@ } /* hide the content, but don't destroy the frames */ -*[collapsed="true"] { +*[collapsed="true"], +*[moz-collapsed="true"] { visibility: collapse; } @@ -207,7 +208,7 @@ caption { /******* toolbar *******/ toolbox { - -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-base"); + -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbox"); -moz-box-orient: vertical; } @@ -215,6 +216,10 @@ toolbar { -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar"); } +toolbargrippy { + -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbargrippy"); +} + toolbarseparator { -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbarseparator"); }