#include <QPainter>
#include <QPalette>
+#include <QDebug>
+
ColumnHandleItem::ColumnHandleItem(qreal w, QGraphicsItem *parent)
: QGraphicsItem(parent),
_width(w),
}
void ColumnHandleItem::sceneRectChanged(const QRectF &rect) {
- if(rect.height() != boundingRect().height())
- prepareGeometryChange();
+ Q_UNUSED(rect)
+ prepareGeometryChange();
}
void ColumnHandleItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
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);