Mac and Win XBL buttons. Not part of build.

This commit is contained in:
hyatt%netscape.com 2000-12-02 10:29:29 +00:00
Родитель 2c440ecb7e
Коммит 7be278ade2
32 изменённых файлов: 508 добавлений и 25 удалений

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

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

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

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

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

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

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

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

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

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

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

@ -0,0 +1,107 @@
/** Mac Buttons **/
button, input[type="button"], input[type="submit"], input[type="reset"] {
border : 0px;
-moz-user-focus : normal;
-moz-user-select : none;
min-width : 60px;
color : #000000;
background-color : transparent !important; /* Greatly increases responsiveness and 'feel' */
font : 10px geneva;
padding : 0px;
margin : 0px;
}
input[type="submit"],input[type="reset"] {
font : 10pt geneva;
font-weight : bold !important;
}
.button-image-left {
background : url(button-normal-left.gif) no-repeat;
width : 4px;
height : 20px;
-moz-user-focus : none;
}
.button-image-middle {
background : url(button-normal-middle.gif) repeat-x;
-moz-user-focus : none;
}
.button-text-box {
text-align : center;
vertical-align : middle;
padding : 0px 3px;
}
.button-image-right {
background : url(button-normal-right.gif) no-repeat;
width : 4px;
height : 20px;
-moz-user-focus : none;
}
.button-top-spring {
height : 2px;
}
.button-bottom-spring {
height : 3px;
}
button:hover:active,
input[type="button"]:hover:active,
input[type="submit"]:hover:active,
input[type="reset"]:hover:active
{
color : #FFFFFF
}
button:hover:active > .button-image-left,
input[type="button"]:hover:active > .button-image-left,
input[type="submit"]:hover:active > .button-image-left,
input[type="reset"]:hover:active > .button-image-left
{
background : url(button-pressed-left.gif) no-repeat;
}
button:hover:active > .button-image-middle,
input[type="button"]:hover:active > .button-image-middle,
input[type="submit"]:hover:active > .button-image-middle,
input[type="reset"]:hover:active > .button-image-middle
{
background : url(button-pressed-middle.gif) repeat-x;
}
button:hover:active > .button-image-right
input[type="button"]:hover:active > .button-image-right,
input[type="submit"]:hover:active > .button-image-right,
input[type="reset"]:hover:active > .button-image-right
{
background : url(button-pressed-right.gif) no-repeat;
}
button[disabled]:hover:active > .button-image-left,
input[type="button"][disabled]:hover:active > .button-image-left,
input[type="submit"][disabled]:hover:active > .button-image-left,
input[type="reset"][disabled]:hover:active > .button-image-left,
.button-image-left[disabled] {
background : url(button-disabled-left.gif) no-repeat;
}
button[disabled]:hover:active > .button-image-middle,
input[type="button"][disabled]:hover:active > .button-image-middle,
input[type="submit"][disabled]:hover:active > .button-image-middle,
input[type="reset"][disabled]:hover:active > .button-image-middle,
.button-image-middle[disabled] {
background : url(button-disabled-middle.gif) repeat-x;
}
button[disabled]:hover:active > .button-image-right,
input[type="button"][disabled]:hover:active > .button-image-right,
input[type="submit"][disabled]:hover:active > .button-image-right,
input[type="reset"][disabled]:hover:active > .button-image-right,
.button-image-right[disabled] {
background : url(button-disabled-right.gif) no-repeat;
}

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

@ -0,0 +1,39 @@
<?xml version="1.0"?>
<bindings id="buttonBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="button" extends="xul:button">
<content>
<xul:spring class="button-image-left" inherits="disabled"/>
<xul:box flex="1" class="button-image-middle" inherits="disabled" orient="vertical" align="center">
<xul:spring flex="1" class="button-top-spring"/>
<xul:box flex="1">
<xul:html class="button-text-box" flex="1">
<children/>
</xul:html>
</xul:box>
<xul:spring flex="1" class="button-bottom-spring"/>
</xul:box>
<xul:spring class="button-image-right" inherits="disabled"/>
</content>
</binding>
<binding id="inputButton" extends="xul:button">
<content>
<xul:spring class="button-image-left" inherits="disabled"/>
<xul:box flex="1" class="button-image-middle" inherits="disabled" orient="vertical" align="center">
<xul:spring flex="1" class="button-top-spring"/>
<xul:box flex="1">
<xul:box class="button-text-box" flex="1">
<xul:text inherits="disabled,value,crop,accesskey"/>
</xul:box>
</xul:box>
<xul:spring flex="1" class="button-bottom-spring"/>
</xul:box>
<xul:spring class="button-image-right" inherits="disabled"/>
</content>
</binding>
</bindings>

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

@ -22,4 +22,30 @@
/**
Styles for Macintosh form widgets implemented in XBL
**/
@import url(resource:///res/builtin/buttons.css);
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
/* widgets will be removed from this list as their XBL counterparts are implemented */
input[type="image"],
input[type="checkbox"],
input[type="radio"],
select, fieldset, legend {
display: none;
}
input {
-moz-user-focus: normal;
}
button
{
-moz-binding : url("resource:///res/builtin/platformButtonBindings.xml#button");
-moz-user-focus : normal;
}
input[type="button"],input[type="submit"],input[type="reset"] {
-moz-binding : url("resource:///res/builtin/platformButtonBindings.xml#inputButton");
}

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

@ -27,6 +27,8 @@ include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) htmlbindings.xml $(DIST)\bin\res\builtin
$(MAKE_INSTALL) buttonBindings.xml $(DIST)\bin\res\builtin
clobber::
rm -f $(DIST)\bin\res\builtin\htmlbindings.xml
rm -f $(DIST)\bin\res\builtin\buttonBindings.xml

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

@ -0,0 +1,135 @@
button, input[type="button"], input[type="submit"], input[type="reset"]
{
border-left : 1px solid threedface;
border-top : 1px solid threedface;
border-right : 1px solid threeddarkshadow;
border-bottom : 1px solid threeddarkshadow;
background-color : threedface;
margin : 0px;
font : button;
color : buttontext;
-moz-user-focus : normal;
-moz-user-select : none;
}
.button-box-1
{
border-left : 1px solid threedhighlight;
border-top : 1px solid threedhighlight;
border-right : 1px solid threedshadow;
border-bottom : 1px solid threedshadow;
-moz-user-focus : none;
}
.button-box-2
{
border : 1px solid threedface;
}
button:hover:active,
input[type="button"]:hover:active,
input[type="submit"]:hover:active,
input[type="reset"]:hover:active
{
border : 1px solid threeddarkshadow;
}
button:hover:active > .button-box-1,
input[type="button"]:hover:active > .button-box-1,
input[type="submit"]:hover:active > .button-box-1,
input[type="reset"]:hover:active > .button-box-1
{
border : 1px solid threedshadow;
}
button:hover:active > .button-box-1 > .button-box-2,
input[type="button"]:hover:active > .button-box-1 > .button-box-2,
input[type="submit"]:hover:active > .button-box-1 > .button-box-2,
input[type="reset"]:hover:active > .button-box-1 > .button-box-2
{
border : 1px solid threedface;
}
button:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"]:hover:active > .button-box-1 > .button-box-2 > .button-box-text
{
padding : 1px 2px 0px 3px;
}
button[disabled],
button[disabled]:hover:active,
input[type="button"][disabled],
input[type="button"][disabled]:hover:active,
input[type="submit"][disabled],
input[type="submit"][disabled]:hover:active,
input[type="reset"][disabled],
input[type="reset"][disabled]:hover:active
{
color : graytext;
}
button[disabled] > .button-box-1 > .button-box-2 > .button-box-text,
button[disabled]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"][disabled] > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"][disabled]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"][disabled] > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"][disabled]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"][disabled] > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"][disabled]:hover:active > .button-box-1 > .button-box-2 > .button-box-text
{
padding : 0px 3px 1px 2px;
}
button:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
input[type="reset"]:focus
{
border : 1px solid threeddarkshadow;
}
.button-box-text,
button[disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"][disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"][disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"][disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text
{
text-align : center;
vertical-align : middle;
padding : 0px 3px 1px 2px;
border : 1px solid transparent;
margin : 1px;
}
button:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"]:focus > .button-box-1 > .button-box-2 > .button-box-text
{
border : 1px dotted threeddarkshadow;
}
/* outer frame */
button:focus > .button-box-1,
input[type="button"]:focus > .button-box-1,
input[type="submit"]:focus > .button-box-1,
input[type="reset"]:focus > .button-box-1
{
border-left : 1px solid threedhighlight;
border-top : 1px solid threedhighlight;
border-right : 1px solid threeddarkshadow;
border-bottom : 1px solid threeddarkshadow;
}
button:focus > .button-box-1 > .button-box-2,
input[type="button"]:focus > .button-box-1 > .button-box-2,
input[type="submit"]:focus > .button-box-1 > .button-box-2,
input[type="reset"]:focus > .button-box-1 > .button-box-2
{
border-left : 1px solid threedface;
border-top : 1px solid threedface;
border-right : 1px solid threedshadow;
border-bottom : 1px solid threedshadow;
}

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

@ -0,0 +1,31 @@
<?xml version="1.0"?>
<bindings id="formWidgets"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="button" extends="xul:button">
<content>
<xul:box class="button-box-1" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1">
<xul:html class="button-box-text" flex="1" autostretch="never">
<children/>
</xul:html>
</xul:box>
</xul:box>
</content>
</binding>
<binding id="inputButton" extends="xul:button">
<content>
<xul:box class="button-box-1" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1">
<xul:box class="button-box-text" flex="1" autostretch="never">
<xul:text inherits="value" value="Submit Query"/>
</xul:box>
</xul:box>
</xul:box>
</content>
</binding>
</bindings>

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,25 +0,0 @@
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/**
Styles for Macintosh form widgets implemented in XBL
**/

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

@ -27,6 +27,8 @@ include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) htmlbindings.xml $(DIST)\bin\res\builtin
$(MAKE_INSTALL) buttonBindings.xml $(DIST)\bin\res\builtin
clobber::
rm -f $(DIST)\bin\res\builtin\htmlbindings.xml
rm -f $(DIST)\bin\res\builtin\buttonBindings.xml

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

@ -0,0 +1,135 @@
button, input[type="button"], input[type="submit"], input[type="reset"]
{
border-left : 1px solid threedface;
border-top : 1px solid threedface;
border-right : 1px solid threeddarkshadow;
border-bottom : 1px solid threeddarkshadow;
background-color : threedface;
margin : 0px;
font : button;
color : buttontext;
-moz-user-focus : normal;
-moz-user-select : none;
}
.button-box-1
{
border-left : 1px solid threedhighlight;
border-top : 1px solid threedhighlight;
border-right : 1px solid threedshadow;
border-bottom : 1px solid threedshadow;
-moz-user-focus : none;
}
.button-box-2
{
border : 1px solid threedface;
}
button:hover:active,
input[type="button"]:hover:active,
input[type="submit"]:hover:active,
input[type="reset"]:hover:active
{
border : 1px solid threeddarkshadow;
}
button:hover:active > .button-box-1,
input[type="button"]:hover:active > .button-box-1,
input[type="submit"]:hover:active > .button-box-1,
input[type="reset"]:hover:active > .button-box-1
{
border : 1px solid threedshadow;
}
button:hover:active > .button-box-1 > .button-box-2,
input[type="button"]:hover:active > .button-box-1 > .button-box-2,
input[type="submit"]:hover:active > .button-box-1 > .button-box-2,
input[type="reset"]:hover:active > .button-box-1 > .button-box-2
{
border : 1px solid threedface;
}
button:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"]:hover:active > .button-box-1 > .button-box-2 > .button-box-text
{
padding : 1px 2px 0px 3px;
}
button[disabled],
button[disabled]:hover:active,
input[type="button"][disabled],
input[type="button"][disabled]:hover:active,
input[type="submit"][disabled],
input[type="submit"][disabled]:hover:active,
input[type="reset"][disabled],
input[type="reset"][disabled]:hover:active
{
color : graytext;
}
button[disabled] > .button-box-1 > .button-box-2 > .button-box-text,
button[disabled]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"][disabled] > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"][disabled]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"][disabled] > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"][disabled]:hover:active > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"][disabled] > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"][disabled]:hover:active > .button-box-1 > .button-box-2 > .button-box-text
{
padding : 0px 3px 1px 2px;
}
button:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
input[type="reset"]:focus
{
border : 1px solid threeddarkshadow;
}
.button-box-text,
button[disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"][disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"][disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"][disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text
{
text-align : center;
vertical-align : middle;
padding : 0px 3px 1px 2px;
border : 1px solid transparent;
margin : 1px;
}
button:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="button"]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="submit"]:focus > .button-box-1 > .button-box-2 > .button-box-text,
input[type="reset"]:focus > .button-box-1 > .button-box-2 > .button-box-text
{
border : 1px dotted threeddarkshadow;
}
/* outer frame */
button:focus > .button-box-1,
input[type="button"]:focus > .button-box-1,
input[type="submit"]:focus > .button-box-1,
input[type="reset"]:focus > .button-box-1
{
border-left : 1px solid threedhighlight;
border-top : 1px solid threedhighlight;
border-right : 1px solid threeddarkshadow;
border-bottom : 1px solid threeddarkshadow;
}
button:focus > .button-box-1 > .button-box-2,
input[type="button"]:focus > .button-box-1 > .button-box-2,
input[type="submit"]:focus > .button-box-1 > .button-box-2,
input[type="reset"]:focus > .button-box-1 > .button-box-2
{
border-left : 1px solid threedface;
border-top : 1px solid threedface;
border-right : 1px solid threedshadow;
border-bottom : 1px solid threedshadow;
}

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

@ -0,0 +1,31 @@
<?xml version="1.0"?>
<bindings id="formWidgets"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="button" extends="xul:button">
<content>
<xul:box class="button-box-1" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1">
<xul:html class="button-box-text" flex="1" autostretch="never">
<children/>
</xul:html>
</xul:box>
</xul:box>
</content>
</binding>
<binding id="inputButton" extends="xul:button">
<content>
<xul:box class="button-box-1" flex="1">
<xul:box class="button-box-2" autostretch="never" flex="1">
<xul:box class="button-box-text" flex="1" autostretch="never">
<xul:text inherits="value" value="Submit Query"/>
</xul:box>
</xul:box>
</xul:box>
</content>
</binding>
</bindings>