src/eric7/HexEdit/HexEditWidget.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9624
b47dfa7a137d
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
540 540
541 @param font font used to show the data 541 @param font font used to show the data
542 @type QFont 542 @type QFont
543 """ 543 """
544 super().setFont(font) 544 super().setFont(font)
545 try: 545 self.__pxCharWidth = self.fontMetrics().horizontalAdvance("2")
546 self.__pxCharWidth = self.fontMetrics().horizontalAdvance("2")
547 except AttributeError:
548 self.__pxCharWidth = self.fontMetrics().width("2")
549 self.__pxCharHeight = self.fontMetrics().height() 546 self.__pxCharHeight = self.fontMetrics().height()
550 self.__pxGapAdr = self.__pxCharWidth // 2 547 self.__pxGapAdr = self.__pxCharWidth // 2
551 self.__pxGapAdrHex = self.__pxCharWidth 548 self.__pxGapAdrHex = self.__pxCharWidth
552 self.__pxGapHexAscii = 2 * self.__pxCharWidth 549 self.__pxGapHexAscii = 2 * self.__pxCharWidth
553 self.__pxCursorWidth = self.__pxCharHeight // 7 550 self.__pxCursorWidth = self.__pxCharHeight // 7

eric ide

mercurial