Fx60: Restore prefwindow bindings

The XBL prefwindow bindings are removed in Firefox 60, so this adds them
back, along with necessary styling, to allow the existing preferences to
work until the preferences are rewritten with React. The preferences.xml
file in the Mozilla source has platform ifdefs, but since this is a
temporary hack I've just duplicated the file for each platform with the
necessary lines included.

I haven't yet tested the styling on Windows/Linux.
This commit is contained in:
Dan Stillman 2019-08-26 06:46:34 -04:00
parent 3d8d4679f4
commit dc8a45485c
9 changed files with 4441 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

View file

@ -0,0 +1,138 @@
/* 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/. */
prefwindow,
prefwindow:root /* override :root from above */ {
-moz-binding: url("chrome://zotero/content/bindings/preferences-mac.xml#prefwindow");
-moz-box-orient: vertical;
}
prefpane {
-moz-binding: url("chrome://zotero/content/bindings/preferences-mac.xml#prefpane");
-moz-box-orient: vertical;
}
prefwindow > .paneDeckContainer {
overflow: hidden;
}
prefpane > .content-box {
overflow: hidden;
}
prefwindow[type="child"] > .paneDeckContainer {
overflow: -moz-hidden-unscrollable;
}
prefwindow[type="child"] > prefpane > .content-box {
-moz-box-flex: 1;
overflow: -moz-hidden-unscrollable;
}
preferences {
-moz-binding: url("chrome://zotero/content/bindings/preferences-mac.xml#preferences");
visibility: collapse;
}
preference {
-moz-binding: url("chrome://zotero/content/bindings/preferences-mac.xml#preference");
visibility: collapse;
}
radio[pane] {
-moz-binding: url("chrome://zotero/content/bindings/preferences-mac.xml#panebutton") !important;
-moz-box-orient: vertical;
-moz-box-align: center;
}
prefwindow[chromehidden~="toolbar"] .chromeclass-toolbar {
display: none;
}
prefwindow {
padding: 0;
font: -moz-dialog !important;
-moz-appearance: dialog;
color: -moz-DialogText;
}
prefpane {
padding: 12px 12px 0 12px;
}
prefwindow[type="child"] > prefpane {
padding: 0;
}
.prefWindow-dlgbuttons {
margin: 0 12px 12px;
padding-top: 0 !important;
}
.paneSelector {
font: message-box;
padding: 1px 4px;
-moz-appearance: toolbar;
margin: 0;
}
radio[pane] {
border: solid transparent;
border-width: 0 2px;
padding: 5px 4px 3px;
margin: 0;
-moz-appearance: none;
text-shadow: rgba(255, 255, 255, 0.4) 0 1px;
}
radio[pane]:active:hover {
text-shadow: none;
}
radio[pane]:active:hover > .paneButtonIcon {
filter: brightness(0.55);
}
radio[pane][selected="true"] {
-moz-border-image: url("chrome://zotero-platform/content/panebutton-active.png") 0 2 fill repeat stretch;
}
radio[pane][selected="true"]:-moz-window-inactive {
-moz-border-image: url("chrome://zotero-platform/content/panebutton-inactive.png") 0 2 fill repeat stretch;
}
.paneButtonLabel {
margin: 0 !important;
}
groupbox {
padding: 5px 1px 1px;
padding-inline-start: 0;
margin: 6px;
}
.groupbox-title {
border-bottom: #b5b5b5 1px solid;
}
.groupbox-body {
-moz-appearance: groupbox;
padding: 8px 8px 3px;
margin: 0;
}
caption {
padding-inline-start: 4px;
padding-bottom: 1px;
font: caption;
}
/* !important is needed to override label in global.css */
.caption-text {
margin-top: 0 !important;
margin-bottom: 0 !important;
margin-inline-start: 1px !important;
}

View file

@ -0,0 +1,107 @@
/* 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/. */
prefwindow,
prefwindow:root /* override :root from above */ {
-moz-binding: url("chrome://zotero/content/bindings/preferences-unix.xml#prefwindow");
-moz-box-orient: vertical;
}
prefpane {
-moz-binding: url("chrome://zotero/content/bindings/preferences-unix.xml#prefpane");
-moz-box-orient: vertical;
}
prefwindow > .paneDeckContainer {
overflow: hidden;
}
prefpane > .content-box {
overflow: hidden;
}
prefwindow[type="child"] > .paneDeckContainer {
overflow: -moz-hidden-unscrollable;
}
prefwindow[type="child"] > prefpane > .content-box {
-moz-box-flex: 1;
overflow: -moz-hidden-unscrollable;
}
preferences {
-moz-binding: url("chrome://zotero/content/bindings/preferences-unix.xml#preferences");
visibility: collapse;
}
preference {
-moz-binding: url("chrome://zotero/content/bindings/preferences-unix.xml#preference");
visibility: collapse;
}
radio[pane] {
-moz-binding: url("chrome://zotero/content/bindings/preferences-unix.xml#panebutton") !important;
-moz-box-orient: vertical;
-moz-box-align: center;
}
prefwindow[chromehidden~="toolbar"] .chromeclass-toolbar {
display: none;
}
prefwindow {
padding: 0px;
-moz-appearance: window;
background-color: -moz-Dialog;
color: -moz-DialogText;
font: message-box;
}
prefpane {
padding: 8px;
}
prefwindow[type="child"] {
padding: 8px;
}
prefwindow[type="child"] > prefpane {
padding: 0px;
}
.prefWindow-dlgbuttons {
padding-bottom: 8px;
padding-inline-start: 8px;
padding-inline-end: 8px;
}
prefwindow[type="child"] .prefWindow-dlgbuttons {
padding: 0px;
}
radio[pane] {
-moz-appearance: none;
min-width: 4.5em;
margin: 0;
padding: 3px;
color: -moz-FieldText;
}
.paneSelector {
-moz-appearance: listbox;
margin: 8px 8px 0 8px;
padding: 0;
}
.paneButtonIcon {
width: 32px;
height: 32px;
}
radio[pane][selected="true"] {
background-color: Highlight;
color: HighlightText;
}

View file

@ -0,0 +1,121 @@
/* 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/. */
prefwindow,
prefwindow:root /* override :root from above */ {
-moz-binding: url("chrome://zotero/content/bindings/preferences-win.xml#prefwindow");
-moz-box-orient: vertical;
}
prefpane {
-moz-binding: url("chrome://zotero/content/bindings/preferences-win.xml#prefpane");
-moz-box-orient: vertical;
}
prefwindow > .paneDeckContainer {
overflow: hidden;
}
prefpane > .content-box {
overflow: hidden;
}
prefwindow[type="child"] > .paneDeckContainer {
overflow: -moz-hidden-unscrollable;
}
prefwindow[type="child"] > prefpane > .content-box {
-moz-box-flex: 1;
overflow: -moz-hidden-unscrollable;
}
preferences {
-moz-binding: url("chrome://zotero/content/bindings/preferences-win.xml#preferences");
visibility: collapse;
}
preference {
-moz-binding: url("chrome://zotero/content/bindings/preferences-win.xml#preference");
visibility: collapse;
}
radio[pane] {
-moz-binding: url("chrome://zotero/content/bindings/preferences-win.xml#panebutton") !important;
-moz-box-orient: vertical;
-moz-box-align: center;
}
prefwindow[chromehidden~="toolbar"] .chromeclass-toolbar {
display: none;
}
prefwindow {
padding: 0px;
-moz-appearance: window;
background-color: -moz-Dialog;
color: -moz-DialogText;
font: message-box;
}
prefpane {
padding-top: 8px;
padding-bottom: 10px;
padding-inline-start: 8px;
padding-inline-end: 10px;
}
prefwindow[type="child"] {
padding-top: 8px;
padding-bottom: 10px;
padding-inline-start: 8px;
padding-inline-end: 10px;
}
prefwindow[type="child"] > prefpane {
padding: 0px;
}
.prefWindow-dlgbuttons {
padding-bottom: 10px;
padding-inline-start: 8px;
padding-inline-end: 10px;
}
prefwindow[type="child"] .prefWindow-dlgbuttons {
padding: 0px;
}
radio[pane] {
-moz-appearance: none;
margin: 0px 1px 0px 1px;
padding: 1px 3px 1px 3px;
min-width: 4.5em;
}
.paneSelector {
border-bottom: 2px groove ThreeDFace;
margin: 0px;
padding-inline-start: 10px;
background-color: -moz-Field;
color: -moz-FieldText;
}
.paneButtonIcon {
width: 32px;
height: 32px;
}
radio[pane]:hover {
background-color: #E0E8F6;
color: black;
-moz-appearance: none;
}
radio[pane][selected="true"] {
background-color: #C1D2EE;
color: black;
-moz-appearance: none;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -26,6 +26,7 @@
<!DOCTYPE prefwindow SYSTEM "chrome://zotero/locale/preferences.dtd">
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://zotero-platform/content/preferences.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<?xml-stylesheet href="chrome://zotero/skin/preferences.css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css"?>