Summary: | Don't send system colors by default | ||
---|---|---|---|
Product: | [Applications] kopete | Reporter: | Chris <chris.kcat> |
Component: | general | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 0.10.3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Chris
2005-08-25 04:42:12 UTC
SVN commit 453253 by ogoffart: fix Bug 111459: Don't send system colors by default BUG: 111459 CCMAIL mattr@kde.org M +27 -6 krichtexteditpart.cpp M +2 -2 krichtexteditpart.h --- branches/KDE/3.5/kdenetwork/kopete/kopete/chatwindow/krichtexteditpart.cpp #453252:453253 @@ -316,10 +316,12 @@ void KopeteRichTextEditPart::setFgColor() { - QColor col; + QColor col=editor->color(); - int s = KColorDialog::getColor( col, editor->color(), editor ); - if ( s != QDialog::Accepted || !col.isValid() ) + int s = KColorDialog::getColor( col, KGlobalSettings::textColor() , editor ); + if(!col.isValid()) + col= KGlobalSettings::textColor() ; + if ( s != QDialog::Accepted ) return; setFgColor( col ); @@ -346,12 +348,24 @@ editor->setColor( mFgColor ); } +QColor KopeteRichTextEditPart::fgColor() +{ + if( mFgColor == KGlobalSettings::textColor()) + return QColor(); + return mFgColor; +} + void KopeteRichTextEditPart::setBgColor() { - QColor col; + QColor col=mBgColor; - int s = KColorDialog::getColor( col, mBgColor, editor ); - if ( s != QDialog::Accepted || !col.isValid() ) + int s = KColorDialog::getColor( col, KGlobalSettings::baseColor(), editor ); + if(!col.isValid()) + { + col=KGlobalSettings::baseColor(); + } + + if ( s != QDialog::Accepted ) return; setBgColor( col ); @@ -374,6 +388,13 @@ editor->setPalette(pal); } +QColor KopeteRichTextEditPart::bgColor() +{ + if( mBgColor == KGlobalSettings::baseColor()) + return QColor(); + return mBgColor; +} + void KopeteRichTextEditPart::setFontSize( int size ) { mFont.setPointSize( size ); --- branches/KDE/3.5/kdenetwork/kopete/kopete/chatwindow/krichtexteditpart.h #453252:453253 @@ -38,9 +38,9 @@ QFont font() { return mFont; } - QColor fgColor() { return mFgColor; } + QColor fgColor(); - QColor bgColor() { return mBgColor; } + QColor bgColor(); void clear(); |