mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Turn off anti-aliasing when drawing the selection rects
This commit is contained in:
parent
996a338ed0
commit
621a81f865
@ -264,6 +264,7 @@ class Canvas(QWidget):
|
||||
def draw_selection_rect(self, painter):
|
||||
cr, sr = self.target, self.selection_state.rect
|
||||
painter.setPen(self.SELECT_PEN)
|
||||
painter.setRenderHint(QPainter.Antialiasing, False)
|
||||
if self.selection_state.current_mode == 'selected':
|
||||
# Shade out areas outside the selection rect
|
||||
for r in (
|
||||
@ -279,7 +280,7 @@ class Canvas(QWidget):
|
||||
# Draw the resize rectangle
|
||||
painter.save()
|
||||
painter.setCompositionMode(QPainter.RasterOp_SourceAndNotDestination)
|
||||
painter.setClipRect(sr)
|
||||
painter.setClipRect(sr.adjusted(1, 1, -1, -1))
|
||||
painter.drawRect(dr)
|
||||
painter.restore()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user