Am Montag, 1. Oktober 2007 19:05 schrieb Alexander Rieder:
> Am Montag, 1. Oktober 2007 00:45 schrieb Olivier Goffart:
> > Le dimanche 30 septembre 2007, Alexander Rieder a écrit :
> > > Hi,
> > > I've attached a patch, that shoud implement the behaviour you wanted.
> >
> > Thanks for your patch.
> >
> > Some comments:
> >
> > You did the same behaviour as in KDE 3.5 , this is fine, but the KDE 4
> > guidelines insist on the fact we can't use hardcoded color.
> > One should use color from KColorScheme
>
> I'll try to change that
I've attached a patch that uses KColorscheme.
>
> > > + && ( newState != Message || m_tabState != Highlighted ||
> > > m_remoteTypingMap.isEmpty() ) )
>
> I added it because Sune said: "only be colured dark red (signifying status
> change) if none of the above applies," this was allready working for
> Highlighted or Message, but not for Typing. So I added a check whether
> someone is Typing(But I don't know if this is the right place to do so)
>
I just realized that this really wasn't needed. It allready works as expected
> > I'm not sure this change is correct. Can you explain why you added that.
> > The whole condition seems a bit complex anyway.
> >
> >
> > Please request a svn account in order to commit patches if you don't have
> > one already
> >
How and wehere do I do so?
> > Please not top post on this list :-)
> >
> > Thanks again
>
> _______________________________________________
> kopete-devel mailing list
> [email protected]
> https://mail.kde.org/mailman/listinfo/kopete-devel
Index: kopete/kopete/chatwindow/kopetechatwindow.cpp
===================================================================
--- kopete/kopete/chatwindow/kopetechatwindow.cpp (Revision 720143)
+++ kopete/kopete/chatwindow/kopetechatwindow.cpp (Arbeitskopie)
@@ -60,6 +60,7 @@
#include <ksqueezedtextlabel.h>
#include <kstandardshortcut.h>
#include <kglobalsettings.h>
+#include <kcolorscheme.h>
#include <khbox.h>
#include <kvbox.h>
#include <ktoolbar.h>
@@ -1221,23 +1222,24 @@ void KopeteChatWindow::updateChatState(
if ( m_tabBar )
{
+ KColorScheme scheme(QPalette::Active, KColorScheme::Window);
switch( newState )
{
case ChatView::Highlighted:
- // m_tabBar->setTabColor( cv, Qt::blue );
+ m_tabBar->setTabTextColor( m_tabBar->indexOf(cv), scheme.foreground(KColorScheme::LinkText).color());
break;
case ChatView::Message:
- // m_tabBar->setTabColor( cv, Qt::red );
+ m_tabBar->setTabTextColor( m_tabBar->indexOf(cv), scheme.foreground(KColorScheme::ActiveText).color());
break;
case ChatView::Changed:
- // m_tabBar->setTabColor( cv, Qt::darkRed );
+ m_tabBar->setTabTextColor( m_tabBar->indexOf(cv), scheme.foreground(KColorScheme::NeutralText).color());
break;
case ChatView::Typing:
- // m_tabBar->setTabColor( cv, Qt::darkGreen );
+ m_tabBar->setTabTextColor( m_tabBar->indexOf(cv), scheme.foreground(KColorScheme::PositiveText).color());
break;
case ChatView::Normal:
default:
- // m_tabBar->setTabColor( cv, KGlobalSettings::textColor() );
+ m_tabBar->setTabTextColor( m_tabBar->indexOf(cv), scheme.foreground(KColorScheme::NormalText).color() );
break;
}
}
Index: kopete/kopete/chatwindow/chatview.cpp
===================================================================
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel