Merge pull request #1500 from pijyoi/bug_aligncenter
bug: AlignCenter should have been AlignHCenter
This commit is contained in:
commit
c62838079b
@ -1110,10 +1110,10 @@ class AxisItem(GraphicsWidget):
|
||||
textFlags = QtCore.Qt.TextDontClip|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter
|
||||
rect = QtCore.QRectF(tickStop+offset, x-(height/2), width, height)
|
||||
elif self.orientation == 'top':
|
||||
textFlags = QtCore.Qt.TextDontClip|QtCore.Qt.AlignCenter|QtCore.Qt.AlignBottom
|
||||
textFlags = QtCore.Qt.TextDontClip|QtCore.Qt.AlignHCenter|QtCore.Qt.AlignBottom
|
||||
rect = QtCore.QRectF(x-width/2., tickStop-offset-height, width, height)
|
||||
elif self.orientation == 'bottom':
|
||||
textFlags = QtCore.Qt.TextDontClip|QtCore.Qt.AlignCenter|QtCore.Qt.AlignTop
|
||||
textFlags = QtCore.Qt.TextDontClip|QtCore.Qt.AlignHCenter|QtCore.Qt.AlignTop
|
||||
rect = QtCore.QRectF(x-width/2., tickStop+offset, width, height)
|
||||
|
||||
#p.setPen(self.pen())
|
||||
|
@ -2330,7 +2330,7 @@ class RulerROI(LineSegmentROI):
|
||||
p.resetTransform()
|
||||
|
||||
txt = fn.siFormat(length, suffix='m') + '\n%0.1f deg' % angle
|
||||
p.drawText(QtCore.QRectF(pos.x()-50, pos.y()-50, 100, 100), QtCore.Qt.AlignCenter | QtCore.Qt.AlignVCenter, txt)
|
||||
p.drawText(QtCore.QRectF(pos.x()-50, pos.y()-50, 100, 100), QtCore.Qt.AlignCenter, txt)
|
||||
|
||||
def boundingRect(self):
|
||||
r = LineSegmentROI.boundingRect(self)
|
||||
|
Loading…
Reference in New Issue
Block a user