11/05/2021

This commit is contained in:
VFX - Visual Effects
2021-05-11 13:29:36 -03:00
parent d838f3d6ef
commit 0eb4fb77fd
23 changed files with 1318 additions and 42 deletions
+21 -10
View File
@@ -57,6 +57,16 @@ class UI_MainWindow(object):
# SET INITIAL PARAMETERS
parent.setMinimumSize(self.settings["startup_size"][0], self.settings["startup_size"][1])
# SET CENTRAL WIDGET
# Add central widget to app
# ///////////////////////////////////////////////////////////////
self.central_widget = QWidget()
self.central_widget_layout = QVBoxLayout(self.central_widget)
if self.settings["custom_title_bar"]:
self.central_widget_layout.setContentsMargins(10,10,10,10)
else:
self.central_widget_layout.setContentsMargins(0,0,0,0)
# LOAD PY WINDOW CUSTOM WIDGET
# Add inside PyWindow "layout" all Widgets
@@ -71,6 +81,9 @@ class UI_MainWindow(object):
# If disable custom title bar
if not self.settings["custom_title_bar"]:
self.window.set_stylesheet(border_radius = 0, border_size = 0)
# ADD PY WINDOW TO CENTRAL WIDGET
self.central_widget_layout.addWidget(self.window)
# ADD FRAME LEFT MENU
# Add here the custom left menu bar
@@ -78,7 +91,6 @@ class UI_MainWindow(object):
self.left_menu_frame = QFrame()
self.left_menu_frame.setMaximumSize(50, 17280)
self.left_menu_frame.setMinimumSize(self.settings["menu_size"]["minimum"], 0)
self.left_menu_frame.setStyleSheet("background: red; border-radius: 8px;")
# LEFT MENU LAYOUT
self.left_menu_layout = QHBoxLayout(self.left_menu_frame)
@@ -87,14 +99,17 @@ class UI_MainWindow(object):
# ADD LEFT MENU
# Add custom left menu here
# ///////////////////////////////////////////////////////////////
self.left_menu = PyLeftMenu(self.left_menu_frame)
self.left_menu = PyLeftMenu(
parent = self.left_menu_frame,
dark_one = self.themes["app_color"]["dark_one"]
)
self.left_menu_layout.addWidget(self.left_menu)
print(self.themes["app_color"]["dark_one"])
# ADD RIGHT WIDGETS
# Add here the right widgets
# ///////////////////////////////////////////////////////////////
self.right_app_frame = QFrame()
self.right_app_frame.setStyleSheet("border-radius: 8px;")
# ADD RIGHT APP LAYOUT
self.right_app_layout = QVBoxLayout(self.right_app_frame)
@@ -109,13 +124,13 @@ class UI_MainWindow(object):
# ADD CONTENT AREA
self.content_area_frame = QFrame()
self.content_area_frame.setStyleSheet("background: #f00")
self.content_area_frame.setStyleSheet("background: transparent")
# CREDITS / BOTTOM APP FRAME
self.credits_frame = QFrame()
self.credits_frame.setMaximumHeight(26)
self.credits_frame.setMaximumHeight(26)
self.credits_frame.setStyleSheet("background: #f00")
self.credits_frame.setStyleSheet("background: transparent")
# ADD WIDGETS TO RIGHT LAYOUT
self.right_app_layout.addWidget(self.title_bar_frame)
@@ -130,8 +145,4 @@ class UI_MainWindow(object):
# ADD CENTRAL WIDGET AND SET CONTENT MARGINS
# ///////////////////////////////////////////////////////////////
parent.setCentralWidget(self.window)
if self.settings["custom_title_bar"]:
parent.setContentsMargins(10,10,10,10)
else:
parent.setContentsMargins(0,0,0,0)
parent.setCentralWidget(self.central_widget)