Revert workaround for bug #65332 (Wrong font used when Courier or Utopia selected) because it broke the printing font. This bug has to be fixed in khtml anyway and I already submitted a patch for review.

svn path=/trunk/kdepim/; revision=258621
wilder-work
Ingo Klcker 23 years ago
parent 0ea5ae98b7
commit ce4ef932c7
  1. 24
      csshelper.cpp
  2. 4
      kmreaderwin.cpp

@ -342,7 +342,9 @@ namespace KMail {
}
QString CSSHelper::Private::printCssDefinitions() const {
const QString headerFont = QString( " font-size: %1pt ! important;\n" )
const QString headerFont = QString( " font-family: \"%1\" ! important;\n"
" font-size: %2pt ! important;\n" )
.arg( mPrintFont.family() )
.arg( mPrintFont.pointSize() );
const QColorGroup & cg = QApplication::palette().active();
@ -356,11 +358,13 @@ namespace KMail {
return
QString( "body {\n"
" font-size: %1pt ! important;\n"
" font-family: \"%1\" ! important;\n"
" font-size: %2pt ! important;\n"
" color: #000000 ! important;\n"
" background-color: #ffffff ! important\n"
"}\n\n" )
.arg( QString::number( mPrintFont.pointSize() ) )
.arg( mPrintFont.family(),
QString::number( mPrintFont.pointSize() ) )
+
QString( "tr.textAtmH,\n"
"tr.rfc822H,\n"
@ -403,7 +407,9 @@ namespace KMail {
const QString fgColor = c1.name();
const QString bgColor = c4.name();
const QString linkColor = c2.name();
const QString headerFont = QString(" font-size: %1px ! important;\n")
const QString headerFont = QString(" font-family: \"%1\" ! important;\n"
" font-size: %2px ! important;\n")
.arg( mBodyFont.family() )
.arg( pointsToPixel( helper->mMetrics, mBodyFont.pointSize() ) );
const QString background = ( mBackingPixmapOn
? QString( " background-image:url(file://%1) ! important;\n" )
@ -434,11 +440,13 @@ namespace KMail {
return
QString( "body {\n"
" font-size: %1 ! important;\n"
" color: %2 ! important;\n"
"%3"
" font-family: \"%1\" ! important;\n"
" font-size: %2 ! important;\n"
" color: %3 ! important;\n"
"%4"
"}\n\n" )
.arg( bodyFontSize,
.arg( bodyFont( fixed ).family(),
bodyFontSize,
fgColor,
background )
+

@ -901,7 +901,6 @@ void KMReaderWin::displayAboutPage()
QString location = locate("data", "kmail/about/main.html");
QString content = kFileToString(location);
mViewer->setStandardFont( mCSSHelper->bodyFont().family() );
mViewer->begin(location);
QString info =
i18n("%1: KMail version; %2: help:// URL; %3: homepage URL; "
@ -974,9 +973,6 @@ void KMReaderWin::updateReaderWin()
htmlWriter()->reset();
if ( mViewer )
mViewer->setStandardFont( mCSSHelper->bodyFont().family() );
KMFolder* folder;
if (message(&folder))
{

Loading…
Cancel
Save