Grey background : title block and border have grey background too.

Help line of item(add shape, or add element) change is color when background is grey


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4031 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-06-28 12:37:10 +00:00
parent 20f4985f7a
commit 748e9bd186
4 changed files with 4 additions and 6 deletions

View File

@@ -423,8 +423,8 @@ void BorderTitleBlock::draw(QPainter *painter)
painter -> setFont(QETApp::diagramTextsFont()); painter -> setFont(QETApp::diagramTextsFont());
//Draw the empty case at the top left of diagram when there is header //Draw the empty case at the top left of diagram when there is header
if (display_border_ && (display_columns_ || display_rows_)) { if (display_border_ && (display_columns_ || display_rows_))
painter -> setBrush(Qt::white); {
QRectF first_rectangle( QRectF first_rectangle(
diagram_rect_.topLeft().x(), diagram_rect_.topLeft().x(),
diagram_rect_.topLeft().y(), diagram_rect_.topLeft().y(),

View File

@@ -188,7 +188,7 @@ void DVEventAddShape::updateHelpCross(const QPoint &p)
QPen pen; QPen pen;
pen.setWidthF(0.4); pen.setWidthF(0.4);
pen.setCosmetic(true); pen.setCosmetic(true);
pen.setColor(Qt::darkGray); pen.setColor(Diagram::background_color == Qt::darkGray ? Qt::lightGray : Qt::darkGray);
QRectF rect = m_diagram -> border_and_titleblock.insideBorderRect(); QRectF rect = m_diagram -> border_and_titleblock.insideBorderRect();

View File

@@ -314,7 +314,7 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg
{ {
m_help_line_a = new QGraphicsLineItem(this); m_help_line_a = new QGraphicsLineItem(this);
QPen pen; QPen pen;
pen.setColor(Qt::darkGray); pen.setColor(Diagram::background_color == Qt::darkGray ? Qt::lightGray : Qt::darkGray);
m_help_line_a -> setPen(pen); m_help_line_a -> setPen(pen);
} }

View File

@@ -1233,7 +1233,6 @@ void TitleBlockTemplate::render(QPainter &painter, const DiagramContext &diagram
QPen pen(Qt::black); QPen pen(Qt::black);
pen.setCosmetic(true); pen.setCosmetic(true);
painter.setPen(pen); painter.setPen(pen);
painter.setBrush(Qt::white);
// draw the titleblock border // draw the titleblock border
painter.drawRect(QRect(0, 0, titleblock_width, titleblock_height)); painter.drawRect(QRect(0, 0, titleblock_width, titleblock_height));
@@ -1322,7 +1321,6 @@ void TitleBlockTemplate::renderCell(QPainter &painter, const TitleBlockCell &cel
QPen pen(QBrush(), 0.0, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin); QPen pen(QBrush(), 0.0, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin);
pen.setColor(Qt::black); pen.setColor(Qt::black);
painter.setPen(pen); painter.setPen(pen);
painter.setBrush(Qt::white);
painter.drawRect(cell_rect); painter.drawRect(cell_rect);
painter.save(); painter.save();