提交 518c0f6c 编写于 作者: 之一Yo's avatar 之一Yo

修复开关按钮抖动问题 (#414)

上级 6251d7b4
......@@ -32,7 +32,7 @@ class Indicator(ToolButton):
self.checkedChanged.emit(self.isChecked())
def _toggleSlider(self):
self.slideAni.setEndValue(26 if self.isChecked() else 5)
self.slideAni.setEndValue(25 if self.isChecked() else 5)
self.slideAni.start()
def toggle(self):
......@@ -178,6 +178,7 @@ class SwitchButton(QWidget):
""" initialize widgets """
self.setAttribute(Qt.WA_StyledBackground)
self.installEventFilter(self)
self.setFixedHeight(22)
# set layout
self.hBox.setSpacing(self.__spacing)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册