106 lines
3.1 KiB
Python
106 lines
3.1 KiB
Python
def get_element_color(element: str) -> str:
|
|
if element == "background":
|
|
return "#FFFFFF"
|
|
if element == "background2":
|
|
return "#F5F5F5"
|
|
if element == "background3":
|
|
return "#E0E0E0"
|
|
if element == "color":
|
|
return "#5D5A5A"
|
|
if element == "text":
|
|
return "#000000"
|
|
else:
|
|
return "#000000"
|
|
def get_sheet() -> str:
|
|
return f"""
|
|
QWidget {{
|
|
background-color: {get_element_color("background")};
|
|
color: {get_element_color("text")};
|
|
}}
|
|
QPushButton {{
|
|
background-color: #0A84FF;
|
|
color: {get_element_color("text")};
|
|
border-radius: 8px;
|
|
font-size: 16px;
|
|
padding: 10px 20px;
|
|
border: none;
|
|
}}
|
|
QPushButton:hover {{
|
|
background-color: #007AFF;
|
|
}}
|
|
QLineEdit {{
|
|
border: 1px solid #3C3C3E;
|
|
border-radius: 8px;
|
|
padding: 10px;
|
|
font-size: 14px;
|
|
background-color: {get_element_color("background2")};
|
|
color: {get_element_color("text")};
|
|
}}
|
|
QLabel {{
|
|
color: {get_element_color("text")};
|
|
}}
|
|
QProgressBar {{
|
|
border: 1px solid #3C3C3E;
|
|
border-radius: 5px;
|
|
background-color: {get_element_color("background2")};
|
|
text-align: center;
|
|
color: {get_element_color("text")};
|
|
}}
|
|
QProgressBar::chunk {{
|
|
background-color: #0A84FF;
|
|
border-radius: 3px;
|
|
}}
|
|
QFrame {{
|
|
background-color: {get_element_color("background2")};
|
|
border: none;
|
|
}}
|
|
QFrame#indicator_bar {{
|
|
background-color: #0A84FF;
|
|
}}
|
|
QScrollBar:vertical {{
|
|
border: none;
|
|
background: #E0E0E0;
|
|
width: 8px;
|
|
margin: 0px;
|
|
}}
|
|
QScrollBar::handle:vertical {{
|
|
background: #0A84FF;
|
|
border-radius: 4px;
|
|
min-height: 20px;
|
|
}}
|
|
QScrollBar::handle:vertical:hover {{
|
|
background: #3B9CFF;
|
|
}}
|
|
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {{
|
|
border: none;
|
|
background: none;
|
|
height: 0px;
|
|
}}
|
|
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {{
|
|
background: none;
|
|
}}
|
|
#drag_area {{
|
|
border: 2px dashed #3498db; border-radius: 10px;
|
|
}}
|
|
QSlider::groove:horizontal {{
|
|
border: 1px solid #3a9bdc;
|
|
height: 10px;
|
|
background: transparent;
|
|
border-radius: 5px;
|
|
}}
|
|
QSlider::sub-page:horizontal {{
|
|
background: #3a9bdc;
|
|
border-radius: 5px;
|
|
}}
|
|
QSlider::add-page:horizontal {{
|
|
background: {get_element_color("background3")};
|
|
border-radius: 5px;
|
|
}}
|
|
QSlider::handle:horizontal {{
|
|
background: white;
|
|
border: 2px solid #3a9bdc;
|
|
width: 14px;
|
|
margin: -4px 0;
|
|
border-radius: 7px;
|
|
}}
|
|
""" |