~blaze/+junk/ubiquity

« back to all changes in this revision

Viewing changes to ubiquity/frontend/kde_components/nmwidgets.py

  • Committer: blaze
  • Date: 2016-09-27 10:34:27 UTC
  • Revision ID: blaze@vivaldi.net-20160927103427-jl1rf0vegi8jdli1
fix polygons drawing - double-check this before releasing anywhere

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
    painter.setCompositionMode(QtGui.QPainter.CompositionMode_Clear)
94
94
    painter.setBrush(QtCore.Qt.black)
95
95
    painter.drawPolygon(QtGui.QPolygon(
96
 
        [center.x(), bottom, 0, middle, 0, bottom]))
 
96
        [QtCore.QPoint(int(center.x()), bottom),
 
97
         QtCore.QPoint(0, int(middle)),
 
98
         QtCore.QPoint(0, bottom)]))
97
99
    painter.drawPolygon(QtGui.QPolygon(
98
 
        [center.x(), bottom, right, middle, right, bottom]))
 
100
        [QtCore.QPoint(int(center.x()), bottom),
 
101
         QtCore.QPoint(right, int(middle)),
 
102
         QtCore.QPoint(right, bottom)]))
99
103
    painter.translate(0, 2)
100
104
    painter.drawRect(0, pix.height() - 2, pix.width(), 2)
101
105
    painter.end()