mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-08 22:59:58 +01:00
Added Abhishek Bansal patch:
Diagram::background_color is now selectable and make component color reverse color for contrast, thanks Abhishek git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2670 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -198,6 +198,11 @@ void DiagramTextItem::setFontSize(int &s) {
|
||||
*/
|
||||
void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
|
||||
painter -> setRenderHint(QPainter::Antialiasing, false);
|
||||
QColor color(Diagram::background_color);
|
||||
color.setBlue(255 - color.blue());
|
||||
color.setGreen(255 - color.green());
|
||||
color.setRed(255 - color.red());
|
||||
setDefaultTextColor(color);
|
||||
QGraphicsTextItem::paint(painter, option, widget);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user