11/06/2021

This commit is contained in:
VFX - Visual Effects
2021-06-11 12:33:19 -03:00
parent c095283da4
commit bd6ea24b41
16 changed files with 489 additions and 415 deletions
+9 -1
View File
@@ -60,4 +60,12 @@ from . py_circular_progress import PyCircularProgress
# PY ICON BUTTON
# ///////////////////////////////////////////////////////////////
from . py_icon_button import PyIconButton
from . py_icon_button import PyIconButton
# PY LINE EDIT
# ///////////////////////////////////////////////////////////////
from . py_line_edit import PyLineEdit
# PY TABLE WIDGET
# ///////////////////////////////////////////////////////////////
from . py_table_widget import PyTableWidget
+3 -1
View File
@@ -51,6 +51,7 @@ class PyLeftColumn(QWidget):
icon_color,
icon_color_hover,
icon_color_pressed,
context_color,
icon_close_path,
radius = 8
):
@@ -71,6 +72,7 @@ class PyLeftColumn(QWidget):
self._icon_color = icon_color
self._icon_color_hover = icon_color_hover
self._icon_color_pressed = icon_color_pressed
self._context_color = context_color
self._icon_close_path = icon_close_path
self._radius = radius
@@ -165,7 +167,7 @@ class PyLeftColumn(QWidget):
icon_color_hover = self._icon_color_hover,
icon_color_pressed = self._icon_color_pressed,
icon_color_active = self._icon_color_pressed,
context_color = self._icon_color_pressed,
context_color = self._context_color,
text_foreground = self._text_title_color,
icon_path = self._icon_close_path,
radius = 6,
+19
View File
@@ -0,0 +1,19 @@
# ///////////////////////////////////////////////////////////////
#
# 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 LINE EDIT
# ///////////////////////////////////////////////////////////////
from . py_line_edit import PyLineEdit
+95
View File
@@ -0,0 +1,95 @@
# ///////////////////////////////////////////////////////////////
#
# 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 *
# STYLE
# ///////////////////////////////////////////////////////////////
style = '''
QLineEdit {{
background-color: {_bg_color};
border-radius: {_radius}px;
border: {_border_size}px solid transparent;
padding-left: 10px;
padding-right: 10px;
selection-color: {_selection_color};
selection-background-color: {_context_color};
color: {_color};
}}
QLineEdit:focus {{
border: {_border_size}px solid {_context_color};
background-color: {_bg_color_active};
}}
'''
# PY PUSH BUTTON
# ///////////////////////////////////////////////////////////////
class PyLineEdit(QLineEdit):
def __init__(
self,
text = "",
place_holder_text = "",
radius = 8,
border_size = 2,
color = "#FFF",
selection_color = "#FFF",
bg_color = "#333",
bg_color_active = "#222",
context_color = "#00ABE8"
):
super().__init__()
# PARAMETERS
if text:
self.setText(text)
if place_holder_text:
self.setPlaceholderText(place_holder_text)
# SET STYLESHEET
self.set_stylesheet(
radius,
border_size,
color,
selection_color,
bg_color,
bg_color_active,
context_color
)
# SET STYLESHEET
def set_stylesheet(
self,
radius,
border_size,
color,
selection_color,
bg_color,
bg_color_active,
context_color
):
# APPLY STYLESHEET
style_format = style.format(
_radius = radius,
_border_size = border_size,
_color = color,
_selection_color = selection_color,
_bg_color = bg_color,
_bg_color_active = bg_color_active,
_context_color = context_color
)
self.setStyleSheet(style_format)
+19
View File
@@ -0,0 +1,19 @@
# ///////////////////////////////////////////////////////////////
#
# 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 TABLE WIDGET
# ///////////////////////////////////////////////////////////////
from . py_table_widget import PyTableWidget
@@ -0,0 +1,90 @@
# ///////////////////////////////////////////////////////////////
#
# 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 *
# IMPORT STYLE
# ///////////////////////////////////////////////////////////////
from . style import *
# PY PUSH BUTTON
# ///////////////////////////////////////////////////////////////
class PyTableWidget(QTableWidget):
def __init__(
self,
radius = 8,
color = "#FFF",
bg_color = "#444",
selection_color = "#FFF",
header_horizontal_color = "#333",
header_vertical_color = "#444",
bottom_line_color = "#555",
grid_line_color = "#555",
scroll_bar_bg_color = "#FFF",
scroll_bar_btn_color = "#3333",
context_color = "#00ABE8"
):
super().__init__()
# PARAMETERS
# SET STYLESHEET
self.set_stylesheet(
radius,
color,
bg_color,
header_horizontal_color,
header_vertical_color,
selection_color,
bottom_line_color,
grid_line_color,
scroll_bar_bg_color,
scroll_bar_btn_color,
context_color
)
# SET STYLESHEET
def set_stylesheet(
self,
radius,
color,
bg_color,
header_horizontal_color,
header_vertical_color,
selection_color,
bottom_line_color,
grid_line_color,
scroll_bar_bg_color,
scroll_bar_btn_color,
context_color
):
# APPLY STYLESHEET
style_format = style.format(
_radius = radius,
_color = color,
_bg_color = bg_color,
_header_horizontal_color = header_horizontal_color,
_header_vertical_color = header_vertical_color,
_selection_color = selection_color,
_bottom_line_color = bottom_line_color,
_grid_line_color = grid_line_color,
_scroll_bar_bg_color = scroll_bar_bg_color,
_scroll_bar_btn_color = scroll_bar_btn_color,
_context_color = context_color
)
self.setStyleSheet(style_format)
+135
View File
@@ -0,0 +1,135 @@
# STYLE
# ///////////////////////////////////////////////////////////////
style = '''
/* /////////////////////////////////////////////////////////////////////////////////////////////////
QTableWidget */
QTableWidget {{
background-color: {_bg_color};
padding: 5px;
border-radius: {_radius}px;
gridline-color: {_grid_line_color};
color: {_color};
}}
QTableWidget::item{{
border-color: none;
padding-left: 5px;
padding-right: 5px;
gridline-color: rgb(44, 49, 60);
border-bottom: 1px solid {_bottom_line_color};
}}
QTableWidget::item:selected{{
background-color: {_selection_color};
}}
QHeaderView::section{{
background-color: rgb(33, 37, 43);
max-width: 30px;
border: 1px solid rgb(44, 49, 58);
border-style: none;
border-bottom: 1px solid rgb(44, 49, 60);
border-right: 1px solid rgb(44, 49, 60);
}}
QTableWidget::horizontalHeader {{
background-color: rgb(33, 37, 43);
}}
QTableWidget QTableCornerButton::section {{
border: none;
background-color: {_header_horizontal_color};
padding: 3px;
border-top-left-radius: {_radius}px;
}}
QHeaderView::section:horizontal
{{
border: none;
background-color: {_header_horizontal_color};
padding: 3px;
}}
QHeaderView::section:vertical
{{
border: none;
background-color: {_header_vertical_color};
padding-left: 5px;
padding-right: 5px;
border-bottom: 1px solid {_bottom_line_color};
margin-bottom: 1px;
}}
/* /////////////////////////////////////////////////////////////////////////////////////////////////
ScrollBars */
QScrollBar:horizontal {{
border: none;
background: {_scroll_bar_bg_color};
height: 8px;
margin: 0px 21px 0 21px;
border-radius: 0px;
}}
QScrollBar::handle:horizontal {{
background: {_context_color};
min-width: 25px;
border-radius: 4px
}}
QScrollBar::add-line:horizontal {{
border: none;
background: {_scroll_bar_btn_color};
width: 20px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
subcontrol-position: right;
subcontrol-origin: margin;
}}
QScrollBar::sub-line:horizontal {{
border: none;
background: {_scroll_bar_btn_color};
width: 20px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
subcontrol-position: left;
subcontrol-origin: margin;
}}
QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal
{{
background: none;
}}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
{{
background: none;
}}
QScrollBar:vertical {{
border: none;
background: {_scroll_bar_bg_color};
width: 8px;
margin: 21px 0 21px 0;
border-radius: 0px;
}}
QScrollBar::handle:vertical {{
background: {_context_color};
min-height: 25px;
border-radius: 4px
}}
QScrollBar::add-line:vertical {{
border: none;
background: {_scroll_bar_btn_color};
height: 20px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}}
QScrollBar::sub-line:vertical {{
border: none;
background: {_scroll_bar_btn_color};
height: 20px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
subcontrol-position: top;
subcontrol-origin: margin;
}}
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {{
background: none;
}}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {{
background: none;
}}
'''