Made the cursor also be a square when square bits is enabled.
This commit is contained in:
parent
2cb7b80cb8
commit
436cb3018c
1 changed files with 5 additions and 0 deletions
|
@ -55,6 +55,11 @@ class BitEditor:
|
||||||
self.font.setLetterSpacing(QFont.SpacingType.PercentageSpacing, spacing)
|
self.font.setLetterSpacing(QFont.SpacingType.PercentageSpacing, spacing)
|
||||||
self.input.setFont(self.font)
|
self.input.setFont(self.font)
|
||||||
|
|
||||||
|
self.cursor_width = self.input.fontMetrics().averageCharWidth()
|
||||||
|
|
||||||
|
# set the cursor with to match the letter spacing
|
||||||
|
self.input.setCursorWidth(self.cursor_width + 1) # + 1 because else it somehow draws a 1px wide vertical line
|
||||||
|
|
||||||
highlight_ones = self.app.settings.highlight_ones
|
highlight_ones = self.app.settings.highlight_ones
|
||||||
|
|
||||||
highlighter_document = self.input.document() if highlight_ones else None
|
highlighter_document = self.input.document() if highlight_ones else None
|
||||||
|
|
Loading…
Add table
Reference in a new issue