Small/large toggler implemented.

This commit is contained in:
hyatt%netscape.com 2002-08-08 08:35:40 +00:00
Родитель b52524650c
Коммит 3f5a96f9a9
3 изменённых файлов: 27 добавлений и 8 удалений

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

@ -734,7 +734,7 @@ Contributor(s):
tooltiptext="&stopButton.tooltip;"/> tooltiptext="&stopButton.tooltip;"/>
<toolbarbutton id="home-button" class="toolbarbutton-1" <toolbarbutton id="home-button" class="toolbarbutton-1"
label="&homeButton.label;" persist="hidden" label="&homeButton.label;"
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);" ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);" ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);" ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
@ -778,7 +778,7 @@ Contributor(s):
<toolbaritem id="go-container" align="center" class="chromeclass-location"> <toolbaritem id="go-container" align="center" class="chromeclass-location">
<button id="go-button" class="button-toolbar" <button id="go-button" class="button-toolbar"
label="&goButton.label;" persist="hidden" label="&goButton.label;"
oncommand="addToUrlbarHistory(); BrowserLoadURL();" oncommand="addToUrlbarHistory(); BrowserLoadURL();"
ondragover="nsDragAndDrop.dragOver(event, goButtonObserver);" ondragover="nsDragAndDrop.dragOver(event, goButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, goButtonObserver);" ondragdrop="nsDragAndDrop.drop(event, goButtonObserver);"
@ -787,7 +787,7 @@ Contributor(s):
</toolbaritem> </toolbaritem>
<toolbarbutton id="print-button" class="toolbarbutton-1" <toolbarbutton id="print-button" class="toolbarbutton-1"
label="&printButton.label;" persist="hidden" label="&printButton.label;"
oncommand="BrowserPrint();" oncommand="BrowserPrint();"
tooltiptext="&printButton.tooltip;"/> tooltiptext="&printButton.tooltip;"/>

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

@ -431,11 +431,19 @@ function updateToolbar()
newSet += ","; newSet += ",";
} }
var toolbar = window.opener.document.getElementById("nav-bar"); var newToolbar = window.opener.document.getElementById("nav-bar");
toolbar.setAttribute("currentset", newSet); newToolbar.setAttribute("currentset", newSet);
window.opener.document.persist("nav-bar", "currentset");
var icons = toolbar.getAttribute("iconsize");
if (icons)
newToolbar.setAttribute("iconsize", icons);
else
newToolbar.removeAttribute("iconsize");
toolbar.rebuild(); window.opener.document.persist("nav-bar", "currentset");
window.opener.document.persist("nav-bar", "iconsize");
newToolbar.rebuild();
} }
// Revert back to the default set. // Revert back to the default set.
@ -476,3 +484,14 @@ function resetToDefault()
gToolbarChanged = true; gToolbarChanged = true;
} }
function updateIconSize(useSmallIcons)
{
var toolbar = document.getElementById("cloneToolbar");
if (useSmallIcons)
toolbar.setAttribute("iconsize", "small");
else
toolbar.removeAttribute("iconsize");
toolbar.removeAttribute("minheight");
gToolbarChanged = true;
}

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

@ -74,7 +74,7 @@
<menuitem label="&text.label;"/> <menuitem label="&text.label;"/>
</menupopup> </menupopup>
</menulist> </menulist>
<checkbox label="&useSmallIcons.label;"/> <checkbox oncommand="updateIconSize(this.checked);" label="&useSmallIcons.label;"/>
<button label="&restoreDefaultSet.label;" oncommand="resetToDefault()"/> <button label="&restoreDefaultSet.label;" oncommand="resetToDefault()"/>
</box> </box>