X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatline.cpp;h=a777347bd6c55bf24a34517a10615643e38612ed;hp=99e09829247ae33b653dc54c96a8ac07b54ba964;hb=9cb22a9cccbdf2bd71568ec3989d41ca167326da;hpb=77176474b628e801ba94d9d50d0d961a12aa01c4 diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index 99e09829..a777347b 100644 --- a/src/qtui/chatline.cpp +++ b/src/qtui/chatline.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2010 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -19,6 +19,7 @@ ***************************************************************************/ #include +#include #include #include @@ -209,25 +210,6 @@ void ChatLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, timestampItem()->paint(painter, option, widget); senderItem()->paint(painter, option, widget); contentsItem()->paint(painter, option, widget); - - // new line marker - if(model_ && row() > 0 && chatScene()->isSingleBufferScene()) { - QModelIndex prevRowIdx = model_->index(row() - 1, 0); - MsgId prevMsgId = prevRowIdx.data(MessageModel::MsgIdRole).value(); - MsgId myMsgId = myIdx.data(MessageModel::MsgIdRole).value(); - Message::Flags flags = (Message::Flags)myIdx.data(MessageModel::FlagsRole).toInt(); - - if(chatView()->isMarkerLineVisible()) { - BufferId bufferId = BufferId(chatScene()->idString().toInt()); - MsgId lastSeenMsgId = Client::networkModel()->markerLineMsgId(bufferId); - if(lastSeenMsgId < myMsgId && lastSeenMsgId >= prevMsgId) { - QLinearGradient gradient(0, 0, 0, contentsItem()->fontMetrics()->lineSpacing()); - gradient.setColorAt(0, QtUi::style()->brush(UiStyle::MarkerLine).color()); // FIXME: Use full (gradient?) brush instead of just the color - gradient.setColorAt(0.1, Qt::transparent); - painter->fillRect(boundingRect(), gradient); - } - } - } } // We need to dispatch all mouse-related events to the appropriate (mouse grabbing) ChatItem