OSDN Git Service

set font when thread is loaded.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Tue, 28 Oct 2003 13:52:59 +0000 (13:52 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Tue, 28 Oct 2003 13:52:59 +0000 (13:52 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@512 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/part/kitathreadview.cpp

index ea9805a..eaf3c6c 100644 (file)
@@ -37,6 +37,7 @@
 #include "kitawritedialog.h"
 #include "../kitacacheinfo.h"
 #include "kita2ch.h"
+#include "kitaconfig.h"
 
 #include "libkita/comment.h"
 #include "libkita/qcp932codec.h"
@@ -198,7 +199,8 @@ void KitaThreadView::update( const QString& result )
   progress->show();
 
   text += "<html><head>";
-  text += "</head><body>";
+  text += "</head>";
+  text += QString("<body style=\"font-size: %1pt; font-family: %2\">").arg( KitaConfig::font().pointSize() ).arg( KitaConfig::font().family() );
 
   for( QStringList::iterator it = lines.begin(); it != lines.end(); ++it ) {
     QString line = (*it);
@@ -498,7 +500,7 @@ void KitaThreadView::setFont( const QFont& font )
   subjectLabel->setFont(font);
 
   DOM::CSSStyleDeclaration style = m_threadPart->htmlDocument().body().style();
-  style.setProperty( "font", font.family(), "" );
+  style.setProperty( "font-family", font.family(), "" );
   style.setProperty( "font-size", QString("%1pt").arg( font.pointSize() ), "" );
 }