Changeset 11196:df14867f80ad in orange


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

Slight fix for the default text annotation geometry.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/document/interactions.py

    r11195 r11196  
    803803        font = self.annotation_item.font() 
    804804        metrics = QFontMetrics(font) 
    805         height = metrics.lineSpacing() 
    806         rect = QRectF(QPointF(point.x(), point.y() - height), 
    807                       QSizeF(150, height)) 
     805        spacing = metrics.lineSpacing() 
     806        margin = self.annotation_item.document().documentMargin() 
     807 
     808        rect = QRectF(QPointF(point.x(), point.y() - spacing - margin), 
     809                      QSizeF(150, spacing + 2 * margin)) 
    808810        return rect 
    809811 
Note: See TracChangeset for help on using the changeset viewer.