Closes #382, Make font sizes configurable/changeable
Configurable in preferences or via hidden pref for more extreme options Also straightened up diplay of UI options in pref pane
This commit is contained in:
parent
2ddfebfa26
commit
006509b5d2
|
@ -108,6 +108,20 @@ var ZoteroPane = new function()
|
|||
document.getElementById('zotero-tb-fullscreen').setAttribute('zoterotop','true');
|
||||
}
|
||||
|
||||
// Font size
|
||||
document.getElementById('zotero-pane').style.fontSize = Zotero.Prefs.get('fontSize') + 'em';
|
||||
var size = Zotero.Prefs.get('fontSize');
|
||||
if (size <= 1) {
|
||||
size = 'small';
|
||||
}
|
||||
else if (size <= 1.25) {
|
||||
size = 'medium';
|
||||
}
|
||||
else {
|
||||
size = 'large';
|
||||
}
|
||||
document.getElementById('zotero-pane').setAttribute('fontSize', size);
|
||||
|
||||
//Initialize collections view
|
||||
collectionsView = new Zotero.CollectionTreeView();
|
||||
var collectionsTree = document.getElementById('zotero-collections-tree');
|
||||
|
@ -1131,7 +1145,7 @@ var ZoteroPane = new function()
|
|||
|
||||
// obj.value == 'cell'/'text'/'image'
|
||||
if (!obj.value) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (tree.id == 'zotero-collections-tree') {
|
||||
|
|
|
@ -43,6 +43,7 @@ To add a new preference:
|
|||
<prefpane id="zotero-prefpane-general" label="&zotero.preferences.prefpane.general;">
|
||||
<preferences>
|
||||
<preference id="pref-zoteroPaneOnTop" name="extensions.zotero.zoteroPaneOnTop" type="bool"/>
|
||||
<preference id="pref-fontSize" name="extensions.zotero.fontSize" type="string"/>
|
||||
<preference id="pref-statusBarIcon" name="extensions.zotero.statusBarIcon" type="int"/>
|
||||
<preference id="pref-automaticScraperUpdates" name="extensions.zotero.automaticScraperUpdates" type="bool"/>
|
||||
<preference id="pref-reportTranslationFailure" name="extensions.zotero.reportTranslationFailure" type="bool"/>
|
||||
|
@ -56,25 +57,52 @@ To add a new preference:
|
|||
|
||||
<groupbox>
|
||||
<caption label="&zotero.preferences.userInterface;"/>
|
||||
<hbox align="center">
|
||||
<label value="&zotero.preferences.position;" control="positionMenu"/>
|
||||
<menulist id="positionMenu" preference="pref-zoteroPaneOnTop">
|
||||
<menupopup>
|
||||
<menuitem label="&zotero.preferences.position.above;" value="true"/>
|
||||
<menuitem label="&zotero.preferences.position.below;" value="false"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<label value="&zotero.preferences.position.browser;"/>
|
||||
</hbox>
|
||||
|
||||
<hbox align="center">
|
||||
<label value="&zotero.preferences.statusBarIcon;" control="statusBarIcon"/>
|
||||
<radiogroup id="statusBarIcon" orient="horizontal" preference="pref-statusBarIcon">
|
||||
<radio src="chrome://zotero/skin/zotero_status_bar.png" value="2"/>
|
||||
<radio src="chrome://zotero/skin/zotero_status_bar_compact.png" value="1"/>
|
||||
<radio label="None" value="0"/>
|
||||
</radiogroup>
|
||||
</hbox>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
|
||||
<rows>
|
||||
<row>
|
||||
<hbox>
|
||||
<label value="&zotero.preferences.position;" control="positionMenu"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="positionMenu" preference="pref-zoteroPaneOnTop">
|
||||
<menupopup>
|
||||
<menuitem label="&zotero.preferences.position.above;" value="true"/>
|
||||
<menuitem label="&zotero.preferences.position.below;" value="false"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<label value="&zotero.preferences.position.browser;"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<hbox>
|
||||
<label value="&zotero.preferences.fontSize;" control="fontSize"/>
|
||||
</hbox>
|
||||
<radiogroup id="fontSize" orient="horizontal" preference="pref-fontSize">
|
||||
<radio id="fontSize1" label="Small" value="1.0"/>
|
||||
<radio id="fontSize2" label="Medium" value="1.25"/>
|
||||
<radio id="fontSize3" label="Large" value="1.5"/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<hbox>
|
||||
<label value="&zotero.preferences.statusBarIcon;" control="statusBarIcon"/>
|
||||
</hbox>
|
||||
<radiogroup id="statusBarIcon" orient="horizontal" preference="pref-statusBarIcon">
|
||||
<radio src="chrome://zotero/skin/zotero_status_bar.png" value="2"/>
|
||||
<radio src="chrome://zotero/skin/zotero_status_bar_compact.png" value="1"/>
|
||||
<radio label="None" value="0"/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<label class="statusLine" value="&zotero.preferences.keys.changesTakeEffect;"/>
|
||||
</groupbox>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<!ENTITY zotero.preferences.position.below "below">
|
||||
<!ENTITY zotero.preferences.position.browser "browser content">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Status bar icon:">
|
||||
<!ENTITY zotero.preferences.fontSize "Font size:">
|
||||
<!ENTITY zotero.preferences.autoUpdate "Automatically check for updated scrapers">
|
||||
<!ENTITY zotero.preferences.updateNow "Update now">
|
||||
<!ENTITY zotero.preferences.reportTranslationFailure "Report broken site translators">
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
/* Font sizes */
|
||||
#zotero-pane[fontSize=medium] #zotero-tb-search, #zotero-pane[fontSize=large] #zotero-tb-search,
|
||||
#zotero-pane[fontSize=medium] zoterotagselector textbox, #zotero-pane[fontSize=large] zoterotagselector textbox
|
||||
{
|
||||
font-size: 1em !important;
|
||||
}
|
||||
|
||||
#zotero-pane[fontSize=medium] treechildren::-moz-tree-row
|
||||
{
|
||||
height: 1.5em;
|
||||
}
|
||||
|
||||
#zotero-pane[fontSize=large] treechildren::-moz-tree-row
|
||||
{
|
||||
height: 1.5em;
|
||||
}
|
||||
|
||||
#zotero-pane[fontSize=large] .treecol-text
|
||||
{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#zotero-status-bar-icon
|
||||
{
|
||||
width: 55px;
|
||||
|
|
|
@ -29,22 +29,47 @@ radio[pane=zotero-prefpane-keys][selected="true"]
|
|||
|
||||
/* General pane */
|
||||
|
||||
grid row hbox:first-child
|
||||
{
|
||||
-moz-box-pack: end;
|
||||
}
|
||||
|
||||
#fontSize
|
||||
{
|
||||
font-size: 3mm; /* Firefox default */
|
||||
}
|
||||
|
||||
#fontSize1
|
||||
{
|
||||
font-size: 1.0em;
|
||||
}
|
||||
|
||||
#fontSize2
|
||||
{
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
#fontSize3
|
||||
{
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#fontSize radio, #statusBarIcon radio
|
||||
{
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
#fontSize radio .radio-icon, #statusBarIcon radio .radio-icon
|
||||
{
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
#statusLine
|
||||
{
|
||||
margin-bottom:.75em;
|
||||
color: red;
|
||||
}
|
||||
|
||||
#statusBarIcon radio
|
||||
{
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
#statusBarIcon radio .radio-icon
|
||||
{
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
/* Shortcut Keys pane */
|
||||
#zotero-prefpane-keys row
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@ pref("extensions.zotero.downloadAssociatedFiles",false);
|
|||
pref("extensions.zotero.reportTranslationFailure",true);
|
||||
pref("extensions.zotero.enableMacClipboard",false);
|
||||
pref("extensions.zotero.automaticTags",true);
|
||||
pref("extensions.zotero.fontSize", "1.0");
|
||||
|
||||
pref("extensions.zotero.lastCreatorFieldMode",0);
|
||||
pref("extensions.zotero.lastRenameAssociatedFile", false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user