From 7d4432cc8a21f63ef5e0805b5cc739dff105d291 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 8 Sep 2009 20:23:49 +0000 Subject: [PATCH] Use zotero-clicky on field mode button instead of toolbarbutton to save space and fix alignment issues on Windows --- chrome/content/zotero-platform/win/itembox.css | 7 +++++++ chrome/content/zotero/bindings/itembox.xml | 6 +++--- chrome/skin/default/zotero/bindings/itembox.css | 13 ++++++------- chrome/skin/default/zotero/zotero.css | 16 ++++------------ 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/chrome/content/zotero-platform/win/itembox.css b/chrome/content/zotero-platform/win/itembox.css index 81d57de653..888d0d2b69 100644 --- a/chrome/content/zotero-platform/win/itembox.css +++ b/chrome/content/zotero-platform/win/itembox.css @@ -16,3 +16,10 @@ row vbox[fieldname=extra] .creator-type-label image { margin-bottom: 0; } + +row label, +row > vbox[fieldname=abstractNote], +row > vbox[fieldname=extra] +{ + padding: 0 1px 2px 2px; +} \ No newline at end of file diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 1053c414f6..5b3838ae23 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -682,7 +682,7 @@ hbox.appendChild(firstlast); // Single/double field toggle - var toggleButton = document.createElement('toolbarbutton'); + var toggleButton = document.createElement('label'); toggleButton.setAttribute('fieldname', 'creator-' + this._creatorCount + '-fieldMode'); toggleButton.className = 'zotero-field-toggle zotero-clicky'; @@ -809,7 +809,7 @@ // Switch to single-field mode if (fieldMode == 1) { - button.setAttribute('image', 'chrome://zotero/skin/textfield-dual.png'); + button.style.MozBorderImage = 'url("chrome://zotero/skin/textfield-dual.png") 0 0 0 0 stretch'; button.setAttribute('tooltiptext', Zotero.getString('pane.item.switchFieldMode.two')); lastName.setAttribute('fieldMode', '1'); button.setAttribute('onclick', "document.getBindingParent(this).switchCreatorMode(Zotero.getAncestorByTagName(this, 'row'), 0)"); @@ -840,7 +840,7 @@ } // Switch to two-field mode else { - button.setAttribute('image', 'chrome://zotero/skin/textfield-single.png'); + button.style.MozBorderImage = 'url("chrome://zotero/skin/textfield-single.png") 0 0 0 0 stretch'; button.setAttribute('tooltiptext', Zotero.getString('pane.item.switchFieldMode.one')); lastName.setAttribute('fieldMode', '0'); button.setAttribute('onclick', "document.getBindingParent(this).switchCreatorMode(Zotero.getAncestorByTagName(this, 'row'), 1)"); diff --git a/chrome/skin/default/zotero/bindings/itembox.css b/chrome/skin/default/zotero/bindings/itembox.css index 300cbdba08..6f32da3103 100644 --- a/chrome/skin/default/zotero/bindings/itembox.css +++ b/chrome/skin/default/zotero/bindings/itembox.css @@ -146,12 +146,11 @@ hbox.zotero-date-field-status label min-width: 26px !important; } -.zotero-field-toggle .toolbarbutton-text +.zotero-field-toggle { - visibility: hidden; -} - -.zotero-field-toggle .toolbarbutton-icon -{ - margin: 0px !important; + width: 27px; + height: 14px; + padding: 0 !important; + margin: 0 5px 0 0 !important; + border-width: 3px !important; } \ No newline at end of file diff --git a/chrome/skin/default/zotero/zotero.css b/chrome/skin/default/zotero/zotero.css index b2672bd1c9..10ad8efc7f 100644 --- a/chrome/skin/default/zotero/zotero.css +++ b/chrome/skin/default/zotero/zotero.css @@ -154,24 +154,16 @@ zoteromergepane { color: transparent !important; padding: 0 !important; margin: 0 5px 0 0 !important; - width: 19px; - height: 12px; + width: 18px; + height: 18px; } .zotero-clicky[value="-"] { -moz-border-image: url('chrome://zotero/skin/minus.png') 0 0 0 0 stretch; - min-width: 18px; - min-height: 18px; - max-width: 18px; - max-height: 18px; } .zotero-clicky[value="+"] { -moz-border-image: url('chrome://zotero/skin/plus.png') 0 0 0 0 stretch; - min-width: 18px; - min-height: 18px; - max-width: 18px; - max-height: 18px; } .zotero-clicky[value="+"][disabled=true] { @@ -192,7 +184,7 @@ zoteromergepane { { background: #666; background: rgb(187, 206, 241); - border: 1px solid rgb(109, 149, 224) !important; + border: 1px solid rgb(109, 149, 224); } .zotero-clicky:not([disabled=true]):active, @@ -200,7 +192,7 @@ zoteromergepane { .zotero-clicky[selected="true"] { color: white; - background: rgb(89, 139, 236) !important; + background: rgb(89, 139, 236); }