This commit is contained in:
恍兮惚兮 2024-06-27 00:59:50 +08:00
parent a811daf895
commit 4131700cea

View File

@ -152,7 +152,10 @@ def checkthemesettingvisandapply_1(self, _dark):
self.btnthemedark.hide() self.btnthemedark.hide()
else: else:
self.btnthemedark.show() self.btnthemedark.show()
try:
self.btnthemedark.clicked.disconnect() self.btnthemedark.clicked.disconnect()
except:
pass
self.btnthemedark.clicked.connect(self.darksetting) self.btnthemedark.clicked.connect(self.darksetting)
else: else:
@ -162,7 +165,10 @@ def checkthemesettingvisandapply_1(self, _dark):
self.btnthemelight.hide() self.btnthemelight.hide()
else: else:
self.btnthemelight.show() self.btnthemelight.show()
try:
self.btnthemelight.clicked.disconnect() self.btnthemelight.clicked.disconnect()
except:
pass
self.btnthemelight.clicked.connect(self.lightsetting) self.btnthemelight.clicked.connect(self.lightsetting)
except: except:
@ -177,7 +183,10 @@ def createbtnthemelight(self):
if not self.lightsetting: if not self.lightsetting:
self.btnthemelight.hide() self.btnthemelight.hide()
else: else:
try:
self.btnthemelight.clicked.disconnect() self.btnthemelight.clicked.disconnect()
except:
pass
self.btnthemelight.clicked.connect(self.lightsetting) self.btnthemelight.clicked.connect(self.lightsetting)
except: except:
pass pass
@ -194,7 +203,10 @@ def createbtnthemedark(self):
if not self.darksetting: if not self.darksetting:
self.btnthemedark.hide() self.btnthemedark.hide()
else: else:
try:
self.btnthemedark.clicked.disconnect() self.btnthemedark.clicked.disconnect()
except:
pass
self.btnthemedark.clicked.connect(self.darksetting) self.btnthemedark.clicked.connect(self.darksetting)
except: except:
pass pass