}
KitaConfig::KitaConfig()
+ : m_threadColor( "black" ), m_threadBackgroundColor( "white" ),
+ m_popupColor( "black" ), m_popupBackgroundColor( "yellow" )
{
}
*/
class KitaConfig{
static KitaConfig* instance;
+ QColor m_threadColor;
+ QColor m_threadBackgroundColor;
+ QColor m_popupColor;
+ QColor m_popupBackgroundColor;
QFont m_font;
QFont m_threadFont;
QString m_boardListURL;
static QString& boardListURL() { return getInstance()->m_boardListURL; }
static KCompletion* nameCompletion() { return &(getInstance()->m_nameCompletion); }
static void addNameCompletionItem( QString& item ) { getInstance()->m_nameCompletion.addItem( item ); }
+ static QColor& threadColor() { return getInstance()->m_threadColor; }
+ static void setThreadColor( QColor color ) { getInstance()->m_threadColor = color; }
+ static QColor& threadBackgroundColor() { return getInstance()->m_threadBackgroundColor; }
+ static void setThreadBackgroundColor( QColor color ) { getInstance()->m_threadBackgroundColor = color; }
+ static QColor& popupColor() { return getInstance()->m_popupColor; }
+ static void setPopupColor( QColor color ) { getInstance()->m_popupColor = color; }
+ static QColor& popupBackgroundColor() { return getInstance()->m_popupBackgroundColor; }
+ static void setPopupBackgroundColor( QColor color ) { getInstance()->m_popupBackgroundColor = color; }
};
#endif
text += "<html><head>";
text += "</head>";
- text += QString("<body style=\"font-size: %1pt; font-family: %2\">").arg( KitaConfig::threadFont().pointSize() ).arg( KitaConfig::font().family() );
+ text += QString("<body style=\"font-size: %1pt; "
+ "font-family: %2; "
+ "color: %3; "
+ "background-color: %4\">")
+ .arg( KitaConfig::threadFont().pointSize() )
+ .arg( KitaConfig::font().family() )
+ .arg( KitaConfig::threadColor().name() )
+ .arg( KitaConfig::threadBackgroundColor().name() );
for( QStringList::iterator it = lines.begin(); it != lines.end(); ++it ) {
QString line = (*it);
: QTextBrowser( frame )
{
zoomOut( static_cast<int>( pointSize() * 0.3 ) );
- setPaletteBackgroundColor( "yellow" );
setWordWrap( QTextEdit::NoWrap );
setResizePolicy( QScrollView::AutoOne );
setFont( KitaConfig::threadFont() );
+ setPaletteForegroundColor( KitaConfig::popupColor() );
+ setPaletteBackgroundColor( KitaConfig::popupBackgroundColor() );
}
PopupTextBrowser::~ PopupTextBrowser()