graphic and blockview support for style colors
git-svn-id: svn://db.shs.com.ru/libs@545 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -38,7 +38,7 @@ void BlockView::_init() {
|
||||
ghost_ = 0;
|
||||
grid_step = 10.;
|
||||
grid_points = 1;
|
||||
grid_pen = QPen(Qt::lightGray, 1, Qt::NoPen);
|
||||
grid_pen = QPen(palette().color(QPalette::Mid), 1, Qt::NoPen);
|
||||
thick = 1;
|
||||
thumb_hide_delay = 500;
|
||||
timer_thumb = 0;
|
||||
@@ -799,11 +799,11 @@ void BlockView::scrollContentsBy(int dx, int dy) {
|
||||
|
||||
|
||||
void BlockView::drawBackground(QPainter * painter, const QRectF & rect) {
|
||||
QGraphicsView::drawBackground(painter, rect);
|
||||
// QGraphicsView::drawBackground(painter, rect);
|
||||
if (mm_thumb) return;
|
||||
float rx, ry, sx = grid_step, sy = grid_step;
|
||||
double scl = qRound(1. / qSqrt(transform().determinant()));
|
||||
painter->eraseRect(rect);
|
||||
painter->fillRect(rect, palette().brush(QPalette::Base));
|
||||
painter->setRenderHint(QPainter::Antialiasing, false);
|
||||
if (scl > 0.) {
|
||||
sx *= scl;
|
||||
|
||||
Reference in New Issue
Block a user