mirror of
https://github.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI.git
synced 2026-06-06 19:09:45 +00:00
25/05/2021
This commit is contained in:
@@ -191,8 +191,22 @@ class PyLeftMenu(QWidget):
|
||||
self.toggle_button.set_icon(self._icon_path)
|
||||
self.animation.setEasingCurve(QEasingCurve.InOutCubic)
|
||||
self.animation.setDuration(self._duration_time)
|
||||
self.animation.start()
|
||||
|
||||
self.animation.start()
|
||||
|
||||
# SELECT ONLY ONE BTN
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def select_only_one(self, widget: str):
|
||||
for btn in self.findChildren(QPushButton):
|
||||
if btn.objectName() == widget:
|
||||
btn.set_active(True)
|
||||
else:
|
||||
btn.set_active(False)
|
||||
|
||||
# DESELECT ALL BTNs
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def deselect_all(self):
|
||||
for btn in self.findChildren(QPushButton):
|
||||
btn.set_active(False)
|
||||
|
||||
# SETUP APP
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -170,6 +170,8 @@ class PyLeftMenuButton(QPushButton):
|
||||
self._is_active = is_active
|
||||
if not is_active:
|
||||
self._set_icon_color = self._icon_color
|
||||
if not is_active:
|
||||
self._set_bg_color = self._dark_one
|
||||
self.repaint()
|
||||
|
||||
# RETURN IF IS ACTIVE MENU
|
||||
|
||||
Reference in New Issue
Block a user