From 9b18cdca266dd13239b8548b239568476791a89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Sat, 11 Apr 2009 23:25:41 +0200 Subject: [PATCH] Modify the default conversation style to apply the CSS rule 'white-space: pre-wrap;' only on the text of inserted messages. Fix the default margins of smileys. --- im/base/content/instantbird/imSmileys.jsm | 3 ++- im/base/content/instantbird/imThemes.jsm | 2 +- im/themes/winstripe/instantbird/conv.css | 9 +++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/im/base/content/instantbird/imSmileys.jsm b/im/base/content/instantbird/imSmileys.jsm index 3829be9316..b874049c5d 100644 --- a/im/base/content/instantbird/imSmileys.jsm +++ b/im/base/content/instantbird/imSmileys.jsm @@ -141,7 +141,7 @@ function getRegexp(aIconsHash) // unused. May be useful later to process a string instead of an HTML node function smileString(aString) { - const smileFormat = '$1'; + const smileFormat = '$1'; return aString.replace(getRegexp(), smileFormat); } @@ -167,6 +167,7 @@ function smileNode(aNode) elt.setAttribute("src", "smile://" + smile); elt.setAttribute("title", smile); elt.setAttribute("alt", smile); + elt.setAttribute("class", "ib-img-smile"); smileNode.parentNode.replaceChild(elt, smileNode); exp.lastIndex = 0; } diff --git a/im/base/content/instantbird/imThemes.jsm b/im/base/content/instantbird/imThemes.jsm index 72b9e3fb1b..bfdce27ea9 100644 --- a/im/base/content/instantbird/imThemes.jsm +++ b/im/base/content/instantbird/imThemes.jsm @@ -213,7 +213,7 @@ const headerFooterReplacements = { }; const statusMessageReplacements = { - message: function(aMsg) aMsg.message, + message: function(aMsg) "" + aMsg.message + "", time: function(aMsg, aFormat) aMsg.time, shortTime: function(aMsg, aFormat) "FIXME", messageClasses: function(aMsg) { diff --git a/im/themes/winstripe/instantbird/conv.css b/im/themes/winstripe/instantbird/conv.css index ae9f0821b4..0351ccee8b 100644 --- a/im/themes/winstripe/instantbird/conv.css +++ b/im/themes/winstripe/instantbird/conv.css @@ -35,12 +35,17 @@ * * ***** END LICENSE BLOCK ***** */ -* { +.ib-msg-txt { white-space: pre-wrap; word-wrap: break-word; } -*:-moz-any-link img { +.ib-img-smile { + margin-bottom: -3px; +} + +*:-moz-any-link .ib-img-smile { border: none; border-bottom: solid 1px; + margin-bottom: -2px; }