mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Fixes alignment of the toggle button
This commit is contained in:
parent
47d6f39c06
commit
094e469f0d
@ -586,7 +586,7 @@ class ToggleCheckbox(QtWidgets.QCheckBox):
|
||||
x = (
|
||||
rect.width() - rect.x() - self.w + 20
|
||||
) # 20 is the padding between text and toggle
|
||||
y = self.height() / 2 - self.h / 2 + self.y() / 2
|
||||
y = self.height() / 2 - self.h / 2 + 16 # 16 is the padding top for the checkbox
|
||||
self.toggleRect = QtCore.QRect(x, y, self.w, self.h)
|
||||
painter.setBrush(QtGui.QColor(self.bg_color))
|
||||
painter.drawRoundedRect(x, y, self.w, self.h, self.h / 2, self.h / 2)
|
||||
|
Loading…
Reference in New Issue
Block a user