diff options
author | Jeff Long <willcode4@gmail.com> | 2020-12-18 14:34:58 -0500 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2021-01-04 09:06:37 -0800 |
commit | 0f1ec604f758e28d788ad71283236928d2d82300 (patch) | |
tree | cf0945b77b4450cdc1127bfeab4b9ca80f3c6f8c /gr-qtgui/python/qtgui | |
parent | c2db4138c108db2f19c2d7856fa6538b3fb7c0ee (diff) |
qtgui: toggle switch was reverse
Fixes #3939.
Toggle switch was left==on, now right==on.
Signed-off-by: Jeff Long <willcode4@gmail.com>
Diffstat (limited to 'gr-qtgui/python/qtgui')
-rw-r--r-- | gr-qtgui/python/qtgui/toggleswitch.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gr-qtgui/python/qtgui/toggleswitch.py b/gr-qtgui/python/qtgui/toggleswitch.py index 7ef5a113fa..ea5b98ee82 100644 --- a/gr-qtgui/python/qtgui/toggleswitch.py +++ b/gr-qtgui/python/qtgui/toggleswitch.py @@ -136,15 +136,15 @@ class ToggleSwitch(QFrame): painter.setBrush(brush) painter.setPen(QPen(QColor('white'), 0)) if self.curState: - painter.drawEllipse(2, 2, size.height() - 4, size.height() - 4) - else: painter.drawEllipse(center_x+2, 2, size.height() - 4, size.height() - 4) + else: + painter.drawEllipse(2, 2, size.height() - 4, size.height() - 4) def mousePressEvent(self, event): if event.x() <= self.size().width()/2: - self.setState(True) - else: self.setState(False) + else: + self.setState(True) super().update() |