hydraveil-gui/gui/v2/ui/builders/bottom_section.py
2026-06-16 07:26:10 -04:00

57 lines
1.7 KiB
Python
Executable file

import os
from PyQt6.QtWidgets import QLabel, QPushButton
from PyQt6.QtGui import QIcon
from PyQt6.QtCore import Qt
def create_bottom_section(parent, btn_path, client_version, is_sync_urgent):
status_label = QLabel(parent)
status_label.setGeometry(15, 518, 780, 20)
status_label.setAlignment(
Qt.AlignmentFlag.AlignLeft | Qt.AlignmentFlag.AlignVCenter)
status_label.setStyleSheet(
"color: rgb(0, 255, 255); font-size: 16px;")
status_label.setText(
f"Status: Client version {client_version}")
tor_text = QLabel("Billing & Browsers", parent)
tor_text.setGeometry(532, 541, 150, 20)
tor_text.setCursor(Qt.CursorShape.PointingHandCursor)
tor_text.setStyleSheet("""
QLabel {
color: cyan;
font-size: 11px;
font-weight: bold;
}
""")
toggle_button = QPushButton(parent)
toggle_button.setGeometry(670, 541, 50, 22)
toggle_button.setCheckable(True)
toggle_button.setCursor(Qt.CursorShape.PointingHandCursor)
tor_icon = QLabel(parent)
tor_icon.setGeometry(730, 537, 25, 25)
tor_icon.setCursor(Qt.CursorShape.PointingHandCursor)
sync_button = QPushButton(parent)
sync_button.setGeometry(771, 541, 22, 22)
sync_button.setObjectName('sync_button')
if is_sync_urgent:
sync_icon = QIcon(os.path.join(btn_path, 'icon_sync_urgent.png'))
else:
sync_icon = QIcon(os.path.join(btn_path, 'icon_sync.png'))
sync_button.setToolTip('Sync')
sync_button.setIcon(sync_icon)
sync_button.setIconSize(sync_button.size())
return {
'status_label': status_label,
'tor_text': tor_text,
'toggle_button': toggle_button,
'tor_icon': tor_icon,
'sync_button': sync_button,
}