Rev 202 | Rev 219 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 202 | Rev 205 | ||
---|---|---|---|
Line 542... | Line 542... | ||
542 | return;
|
542 | return;
|
543 | }
|
543 | }
|
544 | */
|
544 | */
|
545 | 545 | ||
546 | 546 | ||
- | 547 | ||
- | 548 | ||
- | 549 | ||
547 | QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? |
550 | QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? |
548 | ((option.state & QStyle::State_Active) ? QPalette::Normal : QPalette::Inactive ) : |
551 | ((option.state & QStyle::State_Active) ? QPalette::Normal : QPalette::Inactive ) : |
549 | QPalette::Disabled; |
552 | QPalette::Disabled; |
550 | 553 | ||
551 | if (option.state & QStyle::State_Selected) |
554 | if (option.state & QStyle::State_Selected) |
552 | 555 | ||
553 | 556 | ||
554 | painter->fillRect(option.rect, option.palette.color(cg, QPalette::Highlight)); |
557 | painter->fillRect(option.rect, option.palette.color(cg, QPalette::Highlight)); |
555 | 558 | ||
- | 559 | ||
- | 560 | ||
556 | int nX = option.rect.x() + ( ( option.rect.width() - m_pxPicture.rect().width() ) / 2 ); |
561 | int nX = option.rect.x() + ( ( option.rect.width() - m_pxPicture.rect().width() ) / 2 ); |
557 | int nY = option.rect.y() + ( ( option.rect.height() - m_pxPicture.rect().height() ) / 2 ); |
562 | int nY = option.rect.y() + ( ( option.rect.height() - m_pxPicture.rect().height() ) / 2 ); |
- | 563 | // painter->setRenderHint(QPainter::Antialiasing);
|
|
558 | painter->drawPixmap( nX, nY, m_pxPicture ); |
564 | painter->drawPixmap( nX, nY, m_pxPicture ); |
559 | 565 | ||
560 | - | ||
561 | // drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1)); // since we draw the grid ourselves
|
566 | // drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1)); // since we draw the grid ourselves
|
562 | 567 | ||
563 | /*
|
568 | /*
|
564 | QPen pen = painter->pen();
|
569 | QPen pen = painter->pen();
|
565 | painter->setPen(option.palette.color(QPalette::Mid));
|
570 | painter->setPen(option.palette.color(QPalette::Mid));
|