Skip to content

Instantly share code, notes, and snippets.

@int3
Created August 3, 2011 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save int3/1122056 to your computer and use it in GitHub Desktop.
Save int3/1122056 to your computer and use it in GitHub Desktop.
# User Jez Ng <jezreel@gmail.com>
Bug 632555 - Scale about:sessionrestore's treeview based on viewport height. r=zpao
diff --git a/browser/components/sessionstore/content/aboutSessionRestore.xhtml b/browser/components/sessionstore/content/aboutSessionRestore.xhtml
--- a/browser/components/sessionstore/content/aboutSessionRestore.xhtml
+++ b/browser/components/sessionstore/content/aboutSessionRestore.xhtml
@@ -81,17 +81,16 @@
<ul>
<li>&restorepage.restoreSome;</li>
<li>&restorepage.startNew;</li>
</ul>
</div>
<!-- Short Description -->
<div id="errorTrailerDesc">
- <p>&nbsp;</p>
<tree xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="tabList" flex="1" seltype="single" hidecolumnpicker="true"
onclick="onListClick(event);" onkeydown="onListKeyDown(event);"
_window_label="&restorepage.windowLabel;">
<treecols>
<treecol cycler="true" id="restore" type="checkbox" label="&restorepage.restoreHeader;"/>
<splitter class="tree-splitter"/>
<treecol primary="true" id="title" label="&restorepage.listHeader;" flex="1"/>
diff --git a/browser/themes/gnomestripe/browser/aboutSessionRestore.css b/browser/themes/gnomestripe/browser/aboutSessionRestore.css
--- a/browser/themes/gnomestripe/browser/aboutSessionRestore.css
+++ b/browser/themes/gnomestripe/browser/aboutSessionRestore.css
@@ -32,16 +32,56 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
%endif
+html {
+ height: 100%;
+}
+
+body {
+ height: 100%;
+ text-align: center;
+}
+
+#errorPageContainer {
+ background-image: url("chrome://global/skin/icons/warning-64.png");
+ display: -moz-box;
+ width: -moz-available;
+ height: 70%;
+ -moz-box-orient: vertical;
+ text-align: start;
+}
+
+#errorShortDesc > p {
+ margin-top: 0.4em;
+ margin-bottom: 0;
+}
+
+#errorLongContent {
+ display: -moz-box;
+ -moz-box-flex: 1;
+ -moz-box-orient: vertical;
+}
+
+#errorTrailerDesc {
+ display: -moz-box;
+ -moz-box-flex: 1;
+ -moz-box-orient: vertical;
+}
+
+#tabList {
+ margin-top: 2.5em;
+ width: 100%;
+ min-height: 12em;
+}
#errorPageContainer {
background-image: url("moz-icon://stock/gtk-dialog-warning?size=dialog");
}
#tabList {
width: 100%;
height: 12em;
}
diff --git a/browser/themes/pinstripe/browser/aboutSessionRestore.css b/browser/themes/pinstripe/browser/aboutSessionRestore.css
--- a/browser/themes/pinstripe/browser/aboutSessionRestore.css
+++ b/browser/themes/pinstripe/browser/aboutSessionRestore.css
@@ -31,23 +31,55 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
%endif
+html {
+ height: 100%;
+}
+
+body {
+ height: 100%;
+ text-align: center;
+}
+
#errorPageContainer {
background-image: url("chrome://global/skin/icons/warning-64.png");
+ display: -moz-box;
+ width: -moz-available;
+ height: 70%;
+ -moz-box-orient: vertical;
+ text-align: start;
+}
+
+#errorShortDesc > p {
+ margin-top: 0.4em;
+ margin-bottom: 0;
+}
+
+#errorLongContent {
+ display: -moz-box;
+ -moz-box-flex: 1;
+ -moz-box-orient: vertical;
+}
+
+#errorTrailerDesc {
+ display: -moz-box;
+ -moz-box-flex: 1;
+ -moz-box-orient: vertical;
}
#tabList {
+ margin-top: 2.5em;
width: 100%;
- height: 12em;
+ min-height: 12em;
}
treechildren::-moz-tree-image(icon),
treechildren::-moz-tree-image(noicon) {
padding-right: 2px;
margin: 0px 2px;
width: 16px;
height: 16px;
diff --git a/browser/themes/winstripe/browser/aboutSessionRestore.css b/browser/themes/winstripe/browser/aboutSessionRestore.css
--- a/browser/themes/winstripe/browser/aboutSessionRestore.css
+++ b/browser/themes/winstripe/browser/aboutSessionRestore.css
@@ -31,16 +31,57 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
%endif
+html {
+ height: 100%;
+}
+
+body {
+ height: 100%;
+ text-align: center;
+}
+
+#errorPageContainer {
+ background-image: url("chrome://global/skin/icons/warning-64.png");
+ display: -moz-box;
+ width: -moz-available;
+ height: 70%;
+ -moz-box-orient: vertical;
+ text-align: start;
+}
+
+#errorShortDesc > p {
+ margin-top: 0.4em;
+ margin-bottom: 0;
+}
+
+#errorLongContent {
+ display: -moz-box;
+ -moz-box-flex: 1;
+ -moz-box-orient: vertical;
+}
+
+#errorTrailerDesc {
+ display: -moz-box;
+ -moz-box-flex: 1;
+ -moz-box-orient: vertical;
+}
+
+#tabList {
+ margin-top: 2.5em;
+ width: 100%;
+ min-height: 12em;
+}
+
#errorPageContainer {
background-image: url("chrome://global/skin/icons/warning-large.png");
}
#tabList {
width: 100%;
height: 12em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment