summaryrefslogtreecommitdiffstats
path: root/toolkit/content/widgets/splitter.xml
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/content/widgets/splitter.xml')
-rw-r--r--toolkit/content/widgets/splitter.xml37
1 files changed, 37 insertions, 0 deletions
diff --git a/toolkit/content/widgets/splitter.xml b/toolkit/content/widgets/splitter.xml
new file mode 100644
index 000000000..d23631fbe
--- /dev/null
+++ b/toolkit/content/widgets/splitter.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+
+<bindings id="splitterBindings"
+ xmlns="http://www.mozilla.org/xbl"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <binding id="splitter" extends="xul:splitter">
+ <resources>
+ <stylesheet src="chrome://global/skin/splitter.css"/>
+ </resources>
+ </binding>
+
+ <binding id="grippy" extends="xul:button">
+ <resources>
+ <stylesheet src="chrome://global/skin/splitter.css"/>
+ </resources>
+ <handlers>
+ <handler event="command">
+ <![CDATA[
+ var splitter = this.parentNode;
+ if (splitter) {
+ var state = splitter.getAttribute("state");
+ if (state == "collapsed")
+ splitter.setAttribute("state", "open");
+ else
+ splitter.setAttribute("state", "collapsed");
+ }
+ ]]>
+ </handler>
+ </handlers>
+ </binding>
+
+</bindings>