mirror of
https://github.com/Wanderson-Magalhaes/Modern_GUI_PyDracula_PySide6_or_PyQt6.git
synced 2026-02-16 23:43:56 +00:00
v1.0.3
This commit is contained in:
16
main.ui
16
main.ui
@@ -1177,6 +1177,12 @@ Button */
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="extraIcon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
@@ -1184,7 +1190,7 @@ Button */
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
@@ -1193,6 +1199,12 @@ Button */
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="extraLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Left Box</string>
|
||||
</property>
|
||||
@@ -2998,7 +3010,7 @@ background-repeat: no-repeat;</string>
|
||||
<item>
|
||||
<widget class="QLabel" name="version">
|
||||
<property name="text">
|
||||
<string>v1.0.2</string>
|
||||
<string>v1.0.3</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
||||
@@ -109,19 +109,12 @@ class UIFunctions(MainWindow):
|
||||
if widthRightBox != 0:
|
||||
style = self.ui.settingsTopBtn.styleSheet()
|
||||
self.ui.settingsTopBtn.setStyleSheet(style.replace(Settings.BTN_RIGHT_BOX_COLOR, ''))
|
||||
self.ui.extraRightBox.setMinimumWidth(0)
|
||||
else:
|
||||
widthExtended = standard
|
||||
# RESET BTN
|
||||
self.ui.toggleLeftBox.setStyleSheet(style.replace(color, ''))
|
||||
|
||||
# ANIMATION
|
||||
self.animation = QPropertyAnimation(self.ui.extraLeftBox, b"minimumWidth")
|
||||
self.animation.setDuration(Settings.TIME_ANIMATION)
|
||||
self.animation.setStartValue(width)
|
||||
self.animation.setEndValue(widthExtended)
|
||||
self.animation.setEasingCurve(QEasingCurve.InOutQuart)
|
||||
self.animation.start()
|
||||
|
||||
UIFunctions.start_box_animation(self, width, widthRightBox, "left")
|
||||
|
||||
# TOGGLE RIGHT BOX
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
@@ -145,19 +138,47 @@ class UIFunctions(MainWindow):
|
||||
if widthLeftBox != 0:
|
||||
style = self.ui.toggleLeftBox.styleSheet()
|
||||
self.ui.toggleLeftBox.setStyleSheet(style.replace(Settings.BTN_LEFT_BOX_COLOR, ''))
|
||||
self.ui.extraLeftBox.setMinimumWidth(0)
|
||||
else:
|
||||
widthExtended = standard
|
||||
# RESET BTN
|
||||
self.ui.settingsTopBtn.setStyleSheet(style.replace(color, ''))
|
||||
|
||||
# ANIMATION
|
||||
self.animation = QPropertyAnimation(self.ui.extraRightBox, b"minimumWidth")
|
||||
self.animation.setDuration(Settings.TIME_ANIMATION)
|
||||
self.animation.setStartValue(width)
|
||||
self.animation.setEndValue(widthExtended)
|
||||
self.animation.setEasingCurve(QEasingCurve.InOutQuart)
|
||||
self.animation.start()
|
||||
UIFunctions.start_box_animation(self, widthLeftBox, width, "right")
|
||||
|
||||
def start_box_animation(self, left_box_width, right_box_width, direction):
|
||||
right_width = 0
|
||||
left_width = 0
|
||||
|
||||
# Check values
|
||||
if left_box_width == 0 and direction == "left":
|
||||
left_width = 240
|
||||
else:
|
||||
left_width = 0
|
||||
# Check values
|
||||
if right_box_width == 0 and direction == "right":
|
||||
right_width = 240
|
||||
else:
|
||||
right_width = 0
|
||||
|
||||
# ANIMATION LEFT BOX
|
||||
self.left_box = QPropertyAnimation(self.ui.extraLeftBox, b"minimumWidth")
|
||||
self.left_box.setDuration(Settings.TIME_ANIMATION)
|
||||
self.left_box.setStartValue(left_box_width)
|
||||
self.left_box.setEndValue(left_width)
|
||||
self.left_box.setEasingCurve(QEasingCurve.InOutQuart)
|
||||
|
||||
# ANIMATION RIGHT BOX
|
||||
self.right_box = QPropertyAnimation(self.ui.extraRightBox, b"minimumWidth")
|
||||
self.right_box.setDuration(Settings.TIME_ANIMATION)
|
||||
self.right_box.setStartValue(right_box_width)
|
||||
self.right_box.setEndValue(right_width)
|
||||
self.right_box.setEasingCurve(QEasingCurve.InOutQuart)
|
||||
|
||||
# GROUP ANIMATION
|
||||
self.group = QParallelAnimationGroup()
|
||||
self.group.addAnimation(self.left_box)
|
||||
self.group.addAnimation(self.right_box)
|
||||
self.group.start()
|
||||
|
||||
# SELECT/DESELECT MENU
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'mainTxlWnG.ui'
|
||||
## Form generated from reading UI file 'maingnxZcz.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.0.2
|
||||
##
|
||||
@@ -770,14 +770,16 @@ class Ui_MainWindow(object):
|
||||
self.extraTopLayout.setContentsMargins(10, -1, 10, -1)
|
||||
self.extraIcon = QFrame(self.extraTopBg)
|
||||
self.extraIcon.setObjectName(u"extraIcon")
|
||||
self.extraIcon.setMinimumSize(QSize(20, 0))
|
||||
self.extraIcon.setMaximumSize(QSize(20, 20))
|
||||
self.extraIcon.setFrameShape(QFrame.StyledPanel)
|
||||
self.extraIcon.setFrameShape(QFrame.NoFrame)
|
||||
self.extraIcon.setFrameShadow(QFrame.Raised)
|
||||
|
||||
self.extraTopLayout.addWidget(self.extraIcon, 0, 0, 1, 1)
|
||||
|
||||
self.extraLabel = QLabel(self.extraTopBg)
|
||||
self.extraLabel.setObjectName(u"extraLabel")
|
||||
self.extraLabel.setMinimumSize(QSize(150, 0))
|
||||
|
||||
self.extraTopLayout.addWidget(self.extraLabel, 0, 1, 1, 1)
|
||||
|
||||
@@ -1655,5 +1657,6 @@ class Ui_MainWindow(object):
|
||||
self.btn_print.setText(QCoreApplication.translate("MainWindow", u"Print", None))
|
||||
self.btn_logout.setText(QCoreApplication.translate("MainWindow", u"Logout", None))
|
||||
self.creditsLabel.setText(QCoreApplication.translate("MainWindow", u"By: Wanderson M. Pimenta", None))
|
||||
self.version.setText(QCoreApplication.translate("MainWindow", u"v1.0.2", None))
|
||||
self.version.setText(QCoreApplication.translate("MainWindow", u"v1.0.3", None))
|
||||
# retranslateUi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user