Changeset 8255:b0139974189b in orange


Ignore:
Timestamp:
08/22/11 14:12:01 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
25d1325c934bb5df4188bba660602b905b8d42bf
Message:

Move the legend accordingly when resizing the plot.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/plot/owplot.py

    r8254 r8255  
    11511151    def resizeEvent(self, event): 
    11521152        self.replot() 
    1153  
     1153        s = event.size() - event.oldSize() 
     1154        if self.legend_margin.right() > 0: 
     1155            self._legend.setPos(self._legend.pos() + QPointF(s.width(), 0)) 
     1156        if self.legend_margin.bottom() > 0: 
     1157            self._legend.setPos(self._legend.pos() + QPointF(0, s.height())) 
     1158         
    11541159    def showEvent(self, event): 
    11551160        self.replot() 
Note: See TracChangeset for help on using the changeset viewer.