Smaller CSS/JS/XBL patch, should allow XUL changes to go in easier
by andersma@luther.edu r=timeless sr=blake
This commit is contained in:
timeless%mac.com 2001-07-06 02:01:52 +00:00
Родитель 3dbcbcafe4
Коммит b23c8b75f6
20 изменённых файлов: 111 добавлений и 56 удалений

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

@ -4,11 +4,11 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="fieldset" extends="xul:titledbox">
<binding id="fieldset" extends="xul:groupbox">
<content>
<xul:box class="fieldset-title" autostretch="never" orient="vertical">
<xul:vbox class="fieldset-title" autostretch="never">
<children includes="legend"/>
</xul:box>
</xul:vbox>
<xul:box flex="1" class="fieldset-body">
<xul:html flex="1">
<children/>

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

@ -2,9 +2,9 @@
<!--
Can't yet put script tags in XBL (hyatt has the bug)
<script type="text/javascript" src="chrome://embed/content/nsTransferable.js"/>
<script type="text/javascript" src="chrome://embed/content/nsClipboard.js"/>
<script type="text/javascript" src="chrome://embed/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://embed/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://embed/content/nsClipboard.js"/>
<script type="application/x-javascript" src="chrome://embed/content/nsDragAndDrop.js"/>
-->
<bindings id="htmlBindings"

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

@ -24,7 +24,7 @@
/*
if we ever need to use a different string bundle, use srGetStrBundle
by including
<script language="javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
e.g.:
var bundle = srGetStrBundle("chrome://global/locale/filepicker.properties");
*/

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

@ -149,7 +149,7 @@ function Startup()
var selectedText;
if (insertLinkAtCaret)
{
// Titledbox caption:
// Groupbox caption:
dialog.linkTextCaption.setAttribute("value",GetString("LinkText"));
// Message above input field:
dialog.linkTextMessage.setAttribute("value", GetString("EnterLinkText"));

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

@ -227,8 +227,8 @@ nsWalletViewer.prototype =
var row = menuList.parentNode;
var rows = row.parentNode;
var grid = rows.parentNode;
var titledBox = grid.parentNode;
titledBox.setAttribute("hidden", "false");
var groupBox = grid.parentNode;
groupBox.setAttribute("hidden", "false");
row.setAttribute("hidden", "false");
var strings = schemaToValue[aPageTag+elementIDs[i]].split(BREAK);

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

@ -227,8 +227,8 @@ nsWalletViewer.prototype =
var row = menuList.parentNode;
var rows = row.parentNode;
var grid = rows.parentNode;
var titledBox = grid.parentNode;
titledBox.setAttribute("hidden", "false");
var groupBox = grid.parentNode;
groupBox.setAttribute("hidden", "false");
row.setAttribute("hidden", "false");
var strings = schemaToValue[aPageTag+elementIDs[i]].split(BREAK);

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

@ -27,7 +27,7 @@
*/
/* The defaults are WAY to big! */
titledbox {
groupbox {
margin: 2px 5px; 4px; 5px;
padding-top: 2px;
padding-bottom: 4px;

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

@ -27,7 +27,7 @@
*/
/* The defaults are WAY to big! */
titledbox {
groupbox {
margin: 2px 5px /* 4px 5px */;
padding-top: 2px;
padding-bottom: 4px;

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

@ -27,7 +27,7 @@
*/
/* The defaults are WAY to big! */
titledbox {
groupbox {
margin: 2px 5px /* 4px 5px */;
padding-top: 2px;
padding-bottom: 4px;

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

@ -1,12 +1,14 @@
titledbox
/* titledbox is deprecated but included for backwards compatibility;
it is to be removed later */
titledbox,
groupbox
{
border : 2px groove #CCCCCC;
padding : 7px;
margin : 5px;
}
title
label
{
margin-left : 6px;
padding-left : 3px;
@ -15,13 +17,13 @@ title
}
box.titledbox-title
box.groupbox-title
{
padding-left : 5px;
padding-right : 5px;
}
box.titledbox-body
box.groupbox-body
{
padding : inherit;
}

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

@ -1,12 +1,14 @@
titledbox
/* titledbox is deprecated but included for backwards compatibility;
it is to be removed later */
titledbox,
groupbox
{
border : 2px groove #CCCCCC;
padding : 7px;
margin : 5px;
}
title
label
{
margin-left : 6px;
padding-left : 3px;
@ -15,13 +17,13 @@ title
}
box.titledbox-title
box.groupbox-title
{
padding-left : 5px;
padding-right : 5px;
}
box.titledbox-body
box.groupbox-body
{
padding : inherit;
}

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

@ -1,4 +1,7 @@
titledbox
/* titledbox is deprecated but included for backwards compatibility;
it is to be removed later */
titledbox,
groupbox
{
border : 2px groove -moz-Dialog;
padding : 7px !important;
@ -12,7 +15,7 @@ label
background-color : -moz-Dialog;
}
.titledbox-body
.groupbox-body
{
padding : inherit;
}

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

@ -1,4 +1,7 @@
titledbox
/* titledbox is deprecated but included for backwards compatibility;
it is to be removed later */
titledbox,
groupbox
{
border : 2px groove -moz-Dialog;
padding : 7px !important;
@ -12,7 +15,7 @@ label
background-color : -moz-Dialog;
}
.titledbox-body
.groupbox-body
{
padding : inherit;
}

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

@ -152,7 +152,7 @@
/* ::::: widget adjustments ::::: */
/* The defaults are WAY to big! */
titledbox {
groupbox {
margin: 2px 5px 4px 5px;
padding-top: 2px;
padding-bottom: 4px;

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

@ -22,20 +22,22 @@
*/
/* ===== titledbox.css ==================================================
== Styles used by the XUL titledbox and related elements.
== Styles used by the XUL groupbox and related elements.
======================================================================= */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: titledbox ::::: */
/* ::::: groupbox ::::: */
/* (titledbox included for backwards compatibility for now) */
titledbox {
titledbox,
groupbox {
border: 2px groove #C7D0D9;
padding: 5px;
margin: 5px;
}
.titledbox-body {
.groupbox-body {
padding: inherit;
}

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

@ -51,6 +51,7 @@ splitter {
rows > splitter,
window[orient="vertical"] > splitter,
vbox > splitter,
box[orient="vertical"] > splitter {
cursor: n-resize;
border-top: 1px solid #000000;
@ -63,6 +64,7 @@ box[orient="vertical"] > splitter {
rows > splitter > .splitter-internal-box,
window[orient="vertical"] > splitter > .splitter-internal-box,
vbox > splitter > .splitter-internal-box,
box[orient="vertical"] > splitter > .splitter-internal-box {
min-height: 5px;
/* background: url("chrome://global/skin/splitter/splitter-hrz-mid.gif") repeat-x;*/
@ -82,6 +84,7 @@ grippy {
}
window[orient="vertical"] > splitter > grippy,
vbox > splitter > grippy,
box[orient="vertical"] > splitter > grippy {
width: 63px;
height: 5px;
@ -100,11 +103,13 @@ splitter[collapse="after"] > grippy {
/* horizontal grippies */
window[orient="vertical"] > splitter[collapse="before"] > grippy,
vbox > splitter[collapse="before"] > grippy,
box[orient="vertical"] > splitter[collapse="before"] > grippy {
background-image: url("chrome://global/skin/splitter/grip-hrz-before.gif");
}
window[orient="vertical"] > splitter[collapse="after"] > grippy,
vbox > splitter[collapse="after"] > grippy,
box[orient="vertical"] > splitter[collapse="after"] > grippy {
background-image: url("chrome://global/skin/splitter/grip-hrz-after.gif");
}
@ -122,11 +127,13 @@ splitter[collapse="after"] > grippy:hover:active {
/* horizontal grippies */
window[orient="vertical"] > splitter[collapse="before"] > grippy:hover:active,
vbox > splitter[collapse="before"] > grippy:hover:active,
box[orient="vertical"] > splitter[collapse="before"] > grippy:hover:active {
background-image: url("chrome://global/skin/splitter/grip-hrz-act.gif");
}
window[orient="vertical"] > splitter[collapse="after"] > grippy:hover:active,
vbox > splitter[collapse="after"] > grippy:hover:active,
box[orient="vertical"] > splitter[collapse="after"] > grippy:hover:active {
background-image: url("chrome://global/skin/splitter/grip-hrz-act.gif");
}
@ -144,11 +151,13 @@ splitter[collapse="after"][state="collapsed"] > grippy {
/* horizontal grippies */
window[orient="vertical"] > splitter[collapse="before"][state="collapsed"] > grippy,
vbox > splitter[collapse="before"][state="collapsed"] > grippy,
box[orient="vertical"] > splitter[collapse="before"][state="collapsed"] > grippy {
background-image: url("chrome://global/skin/splitter/grip-hrz-after.gif");
}
window[orient="vertical"] > splitter[collapse="after"][state="collapsed"] > grippy,
vbox > splitter[collapse="after"][state="collapsed"] > grippy,
box[orient="vertical"] > splitter[collapse="after"][state="collapsed"] > grippy {
background-image: url("chrome://global/skin/splitter/grip-hrz-before.gif");
}

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

@ -22,20 +22,22 @@
*/
/* ===== titledbox.css ==================================================
== Styles used by the XUL titledbox and related elements.
== Styles used by the XUL groupbox and related elements.
======================================================================= */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: titledbox ::::: */
/* ::::: groupbox ::::: */
/* (titledbox included for backwards compatibility for now) */
titledbox {
titledbox,
groupbox {
border: 2px groove #C7D0D9;
padding: 5px;
margin: 5px;
}
.titledbox-body {
.groupbox-body {
padding: inherit;
}

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

@ -1,30 +1,43 @@
<?xml version="1.0"?>
<bindings id="titledboxBindings"
<bindings id="groupboxBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="titledbox-base">
<binding id="groupbox-base">
<resources>
<stylesheet src="chrome://global/skin/titledbox.css"/>
</resources>
</binding>
<binding id="titledbox" extends="chrome://global/content/bindings/titledbox.xml#titledbox-base">
<binding id="groupbox" extends="chrome://global/content/bindings/titledbox.xml#groupbox-base">
<content>
<xul:box class="titledbox-title" autostretch="never" orient="vertical">
<xul:box class="groupbox-title" autostretch="never" orient="vertical">
<children includes="label"/>
</xul:box>
<xul:box flex="1" class="titledbox-body" inherits="orient,autostretch,align,valign">
<xul:box flex="1" class="groupbox-body" inherits="orient,autostretch,align,valign">
<children/>
</xul:box>
</content>
</binding>
<!-- titledbox included for backwards compatibility purposes; to be removed at a later date -->
<binding id="titledbox" extends="chrome://global/content/bindings/titledbox.xml#groupbox-base">
<content>
<xul:box class="groupbox-title" autostretch="never" orient="vertical">
<children includes="label"/>
</xul:box>
<xul:box flex="1" class="groupbox-body" inherits="orient,autostretch,align,valign">
<children/>
</xul:box>
</content>
</binding>
<binding id="label" extends="chrome://global/content/bindings/titledbox.xml#titledbox-base">
<binding id="label" extends="chrome://global/content/bindings/titledbox.xml#groupbox-base">
<content>
<xul:text inherits="value"/>
</content>
</binding>
</bindings>
</bindings>

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

@ -1,30 +1,43 @@
<?xml version="1.0"?>
<bindings id="titledboxBindings"
<bindings id="groupboxBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="titledbox-base">
<binding id="groupbox-base">
<resources>
<stylesheet src="chrome://global/skin/titledbox.css"/>
</resources>
</binding>
<binding id="titledbox" extends="chrome://global/content/bindings/titledbox.xml#titledbox-base">
<binding id="groupbox" extends="chrome://global/content/bindings/titledbox.xml#groupbox-base">
<content>
<xul:box class="titledbox-title" autostretch="never" orient="vertical">
<xul:box class="groupbox-title" autostretch="never" orient="vertical">
<children includes="label"/>
</xul:box>
<xul:box flex="1" class="titledbox-body" inherits="orient,autostretch,align,valign">
<xul:box flex="1" class="groupbox-body" inherits="orient,autostretch,align,valign">
<children/>
</xul:box>
</content>
</binding>
<!-- titledbox included for backwards compatibility purposes; to be removed at a later date -->
<binding id="titledbox" extends="chrome://global/content/bindings/titledbox.xml#groupbox-base">
<content>
<xul:box class="groupbox-title" autostretch="never" orient="vertical">
<children includes="label"/>
</xul:box>
<xul:box flex="1" class="groupbox-body" inherits="orient,autostretch,align,valign">
<children/>
</xul:box>
</content>
</binding>
<binding id="label" extends="chrome://global/content/bindings/titledbox.xml#titledbox-base">
<binding id="label" extends="chrome://global/content/bindings/titledbox.xml#groupbox-base">
<content>
<xul:text inherits="value"/>
</content>
</binding>
</bindings>
</bindings>

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

@ -72,22 +72,27 @@ window {
/******** box *******/
hbox[autostretch="never"],
box[autostretch="never"] {
vertical-align: middle;
}
hbox[autostretch="never"][valign="top"],
box[autostretch="never"][valign="top"] {
vertical-align: top;
}
hbox[autostretch="never"][valign="bottom"],
box[autostretch="never"][valign="bottom"] {
vertical-align: bottom;
}
hbox[autostretch="never"][halign="center"],
box[autostretch="never"][halign="center"] {
text-align: center;
}
hbox[autostretch="never"][halign="right"],
box[autostretch="never"][halign="right"] {
text-align: right;
}
@ -157,10 +162,11 @@ radio {
-moz-binding: url("chrome://global/content/bindings/radio.xml#radio");
}
/******** titledbox *******/
/******** titledbox (moving solely to groupbox later) *******/
titledbox {
-moz-binding: url("chrome://global/content/bindings/titledbox.xml#titledbox");
titledbox,
groupbox {
-moz-binding: url("chrome://global/content/bindings/titledbox.xml#groupbox");
display: -moz-xul-groupbox;
}
@ -168,7 +174,7 @@ label {
-moz-binding: url("chrome://global/content/bindings/titledbox.xml#label");
}
.titledbox-body {
.groupbox-body {
text-align: inherit;
vertical-align: inherit;
}