mirror of
https://github.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI.git
synced 2026-06-05 10:29:44 +00:00
28/05/2021
This commit is contained in:
@@ -30,6 +30,10 @@ from . py_grips import PyGrips
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_left_menu import PyLeftMenu
|
||||
|
||||
# PY LEFT COLUMN
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_left_column import PyLeftColumn
|
||||
|
||||
# PY TITLE BAR
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_title_bar import PyTitleBar
|
||||
|
||||
@@ -32,7 +32,7 @@ class PyCredits(QWidget):
|
||||
radius = 8,
|
||||
padding = 10
|
||||
):
|
||||
super(PyCredits, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
# PROPERTIES
|
||||
self._copyright = copyright
|
||||
|
||||
@@ -29,7 +29,7 @@ class PyGrips(QWidget):
|
||||
|
||||
# SETUP UI
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
QWidget.__init__(self)
|
||||
super().__init__()
|
||||
self.parent = parent
|
||||
self.setParent(parent)
|
||||
self.wi = Widgets()
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# BY: WANDERSON M.PIMENTA
|
||||
# PROJECT MADE WITH: Qt Designer and PySide6
|
||||
# V: 1.0.0
|
||||
#
|
||||
# This project can be used freely for all uses, as long as they maintain the
|
||||
# respective credits only in the Python scripts, any information in the visual
|
||||
# interface (GUI) can be modified without any implication.
|
||||
#
|
||||
# There are limitations on Qt licenses if you want to use your products
|
||||
# commercially, I recommend reading them on the official website:
|
||||
# https://doc.qt.io/qtforpython/licenses.html
|
||||
#
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
# PY LEFT COLUMN
|
||||
# Left column with custom widgets
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_left_column import PyLeftColumn
|
||||
@@ -0,0 +1,78 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# BY: WANDERSON M.PIMENTA
|
||||
# PROJECT MADE WITH: Qt Designer and PySide6
|
||||
# V: 1.0.0
|
||||
#
|
||||
# This project can be used freely for all uses, as long as they maintain the
|
||||
# respective credits only in the Python scripts, any information in the visual
|
||||
# interface (GUI) can be modified without any implication.
|
||||
#
|
||||
# There are limitations on Qt licenses if you want to use your products
|
||||
# commercially, I recommend reading them on the official website:
|
||||
# https://doc.qt.io/qtforpython/licenses.html
|
||||
#
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
# IMPORT QT CORE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from qt_core import *
|
||||
|
||||
class PyLeftColumn(QWidget):
|
||||
def __init__(
|
||||
self,
|
||||
text_title,
|
||||
icon,
|
||||
bg_color
|
||||
):
|
||||
super().__init__()
|
||||
|
||||
# PARAMETERS
|
||||
self._text_title = text_title
|
||||
self._icon = icon
|
||||
self._bg_color = bg_color
|
||||
|
||||
# SETUP UI
|
||||
self.setup_ui()
|
||||
|
||||
# ADD LEFT COLUMN TO BG FRAME
|
||||
|
||||
|
||||
def setup_ui(self):
|
||||
# BASE LAYOUT
|
||||
self.base_layout = QVBoxLayout(self)
|
||||
self.base_layout.setContentsMargins(0,0,0,0)
|
||||
self.base_layout.setSpacing(8)
|
||||
|
||||
# TITLE FRAME
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
self.title_frame = QFrame()
|
||||
self.title_frame.setMaximumHeight(48)
|
||||
self.title_frame.setMinimumHeight(48)
|
||||
|
||||
# TITLE BASE LAYOUT
|
||||
self.title_base_layout = QVBoxLayout(self.title_frame)
|
||||
self.title_base_layout.setContentsMargins(5,3,5,3)
|
||||
|
||||
# TITLE BG
|
||||
self.title_bg_frame = QFrame()
|
||||
self.title_bg_frame.setObjectName("title_bg_frame")
|
||||
self.title_bg_frame.setStyleSheet(f'''
|
||||
#title_bg_frame {{
|
||||
background: {self._bg_color};
|
||||
border-radius: 8px;
|
||||
}}
|
||||
''')
|
||||
|
||||
# ADD TITLE BG TO LAYOUT
|
||||
self.title_base_layout.addWidget(self.title_bg_frame)
|
||||
|
||||
# CONTENT FRAME
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
self.content_frame = QFrame()
|
||||
self.content_frame.setStyleSheet("background: transparent")
|
||||
|
||||
# ADD TO LAYOUT
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
self.base_layout.addWidget(self.title_frame)
|
||||
self.base_layout.addWidget(self.content_frame)
|
||||
@@ -22,7 +22,7 @@ from qt_core import *
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
class PyDiv(QWidget):
|
||||
def __init__(self, color):
|
||||
super(PyDiv, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
self.layout = QHBoxLayout(self)
|
||||
self.layout.setContentsMargins(5,0,5,0)
|
||||
|
||||
@@ -58,7 +58,7 @@ class PyLeftMenu(QWidget):
|
||||
toggle_text = "Hide Menu",
|
||||
toggle_tooltip = "Show menu"
|
||||
):
|
||||
super(PyLeftMenu, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
# PROPERTIES
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -52,7 +52,7 @@ class PyLeftMenuButton(QPushButton):
|
||||
is_active = False,
|
||||
is_toggle_active = False
|
||||
):
|
||||
super(PyLeftMenuButton, self).__init__()
|
||||
super().__init__()
|
||||
self.setText(text)
|
||||
self.setCursor(Qt.PointingHandCursor)
|
||||
self.setMaximumHeight(50)
|
||||
|
||||
@@ -22,7 +22,7 @@ from qt_core import *
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
class PyDiv(QWidget):
|
||||
def __init__(self, color):
|
||||
super(PyDiv, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
self.layout = QHBoxLayout(self)
|
||||
self.layout.setContentsMargins(0,5,0,5)
|
||||
|
||||
@@ -72,7 +72,7 @@ class PyTitleBar(QWidget):
|
||||
title_size = 10,
|
||||
is_custom_title_bar = True,
|
||||
):
|
||||
super(PyTitleBar, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
settings = Settings()
|
||||
self.settings = settings.items
|
||||
|
||||
@@ -43,7 +43,7 @@ class PyTitleButton(QPushButton):
|
||||
text_foreground = "#8a95aa",
|
||||
is_active = False
|
||||
):
|
||||
super(PyTitleButton, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
# SET DEFAULT PARAMETERS
|
||||
self.setFixedSize(width, height)
|
||||
|
||||
@@ -46,7 +46,7 @@ class PyWindow(QFrame):
|
||||
border_color = "#343b48",
|
||||
enable_shadow = True
|
||||
):
|
||||
super(PyWindow, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
# LOAD SETTINGS
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user