mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-17 23:59:58 +01:00
Basic shapes crossrefitem: update to cosmetic changes
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2939 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -53,12 +53,8 @@ void CrossRefItem::updateLabel() {
|
|||||||
//init the painter
|
//init the painter
|
||||||
QPainter qp(&drawing_);
|
QPainter qp(&drawing_);
|
||||||
QPen pen_;
|
QPen pen_;
|
||||||
|
pen_.setWidthF(0.5);
|
||||||
#ifdef Q_WS_WIN
|
pen_.setCosmetic(true);
|
||||||
pen_.setWidth(1);
|
|
||||||
#elif Q_WS_MAC
|
|
||||||
pen_.setWidth(0.5);
|
|
||||||
#endif
|
|
||||||
qp.setPen(pen_);
|
qp.setPen(pen_);
|
||||||
|
|
||||||
//calcul the size
|
//calcul the size
|
||||||
@@ -156,7 +152,9 @@ void CrossRefItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
|||||||
painter->save();
|
painter->save();
|
||||||
QPen t(Qt::black);
|
QPen t(Qt::black);
|
||||||
t.setStyle(Qt::DashLine);
|
t.setStyle(Qt::DashLine);
|
||||||
|
t.setCosmetic(true);
|
||||||
painter -> setPen(t);
|
painter -> setPen(t);
|
||||||
|
painter -> setRenderHint(QPainter::Antialiasing, false);
|
||||||
painter->drawRect(boundingRect());
|
painter->drawRect(boundingRect());
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
@@ -238,7 +236,8 @@ void CrossRefItem::fillCrossRef(QPainter *painter) {
|
|||||||
else if (state == "NC") NC_list << elmt;
|
else if (state == "NC") NC_list << elmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
painter->setFont(QETApp::diagramTextsFont(6));
|
painter -> setFont(QETApp::diagramTextsFont(4));
|
||||||
|
painter -> setRenderHint(QPainter::Antialiasing, false);
|
||||||
//fill the NO
|
//fill the NO
|
||||||
QString contact_str;
|
QString contact_str;
|
||||||
foreach (Element *elmt, NO_list) {
|
foreach (Element *elmt, NO_list) {
|
||||||
|
|||||||
@@ -104,12 +104,7 @@ void QetShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
|||||||
painter -> setRenderHint(QPainter::Antialiasing, false);
|
painter -> setRenderHint(QPainter::Antialiasing, false);
|
||||||
QRectF rec = boundingRect();
|
QRectF rec = boundingRect();
|
||||||
QPen pen(Qt::black);
|
QPen pen(Qt::black);
|
||||||
|
pen.setWidthF(0.5);
|
||||||
#ifdef Q_WS_WIN
|
|
||||||
pen.setWidth(1);
|
|
||||||
#elif Q_WS_MAC
|
|
||||||
pen.setWidth(0.5);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (isSelected())
|
if (isSelected())
|
||||||
pen.setColor(Qt::red);
|
pen.setColor(Qt::red);
|
||||||
|
|||||||
Reference in New Issue
Block a user