X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fcolumnhandleitem.cpp;h=cf0e5d7ccb2c63c56012eb53eb27f5234a160199;hb=5b53e584f269e9ac1201a428a3812a7a0607ee34;hp=8f1f9a2eb1a4cdb7bade040e6e18c29f97d6e54d;hpb=c5c74323b6d8f3fc6775ca1d08cb84c602bac58d;p=quassel.git diff --git a/src/qtui/columnhandleitem.cpp b/src/qtui/columnhandleitem.cpp index 8f1f9a2e..cf0e5d7c 100644 --- a/src/qtui/columnhandleitem.cpp +++ b/src/qtui/columnhandleitem.cpp @@ -27,6 +27,8 @@ #include #include +#include + ColumnHandleItem::ColumnHandleItem(qreal w, QGraphicsItem *parent) : QGraphicsItem(parent), _width(w), @@ -55,8 +57,8 @@ void ColumnHandleItem::setXLimits(qreal min, qreal max) { } void ColumnHandleItem::sceneRectChanged(const QRectF &rect) { - if(rect.height() != boundingRect().height()) - prepareGeometryChange(); + Q_UNUSED(rect) + prepareGeometryChange(); } void ColumnHandleItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { @@ -119,7 +121,7 @@ void ColumnHandleItem::paint(QPainter *painter, const QStyleOptionGraphicsItem * Q_UNUSED(option); Q_UNUSED(widget); - QLinearGradient gradient(0, 0, width(), 0); + QLinearGradient gradient(boundingRect().topLeft(), boundingRect().topRight()); QColor rulerColor = QApplication::palette().windowText().color(); rulerColor.setAlphaF(_hover); gradient.setColorAt(0, Qt::transparent);