Ignore:
Timestamp:
11/23/12 18:49:16 (17 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Added color and font properties to SchemeAnnotation items.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/canvas/scene.py

    r11195 r11200  
    99from xml.sax.saxutils import escape 
    1010 
    11 from PyQt4.QtGui import QGraphicsScene, QPainter, QBrush, \ 
     11from PyQt4.QtGui import QGraphicsScene, QPainter, QBrush, QColor, QFont, \ 
    1212                        QGraphicsItem 
    1313 
     
    442442            item.resize(w, h) 
    443443            item.setTextInteractionFlags(Qt.TextEditorInteraction) 
     444            font = QFont() 
     445            font.fromString(scheme_annot.font) 
     446            item.setFont(font) 
    444447            scheme_annot.text_changed.connect(item.setPlainText) 
    445448 
     
    448451            start, end = scheme_annot.start_pos, scheme_annot.end_pos 
    449452            item.setLine(QLineF(QPointF(*start), QPointF(*end))) 
     453            item.setColor(QColor(scheme_annot.color)) 
    450454 
    451455        scheme_annot.geometry_changed.connect( 
Note: See TracChangeset for help on using the changeset viewer.