diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml deleted file mode 100644 index 2e3a5043..00000000 --- a/.github/workflows/appimage.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build AppImage -on: [push] - -jobs: - build: - name: AppImage - runs-on: ubuntu-latest - steps: - - name: Dependencies - run: | - sudo apt install libsnappy-dev libsqlite3-dev desktop-file-utils python3-virtualenv python3-venv - sudo pip3 install virtualenv - sudo ln -s /usr/lib/python3/dist-packages/virtualenv.py /usr/local/bin/virtualenv - sudo chmod +x /usr/local/bin/virtualenv - - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - name: get Bundle - run: | - git clone https://github.com/AppImage/pkg2appimage.git --depth=1 - cd pkg2appimage - chmod +x ./pkg2appimage - ./pkg2appimage ../io.srevinsaju.guiscrcpy.yml - cd .. - ls - - - name: show dir - run: ls - - - name: Upload artifact - uses: actions/upload-artifact@v1.0.0 - with: - # Artifact name - name: guiscrcpy.AppImage - # Directory containing files to upload - path: pkg2appimage/out/guiscrcpy-.glibc2.25-x86_64.AppImage diff --git a/README.md b/README.md index 432144ab..95804d7c 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,18 @@ ![Mac OS](https://github.com/srevinsaju/guiscrcpy/workflows/Mac%20OS/badge.svg) [![Updates](https://pyup.io/repos/github/srevinsaju/guiscrcpy/shield.svg)](https://pyup.io/repos/github/srevinsaju/guiscrcpy/) [![Python 3](https://pyup.io/repos/github/srevinsaju/guiscrcpy/python-3-shield.svg)](https://pyup.io/repos/github/srevinsaju/guiscrcpy/) -![PyPI - Python Version](https://img.shields.io/pypi/pyversions/guiscrcpy?style=flat-square) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/guiscrcpy?style=flat-square) ![PyPI](https://img.shields.io/pypi/v/guiscrcpy?style=flat-square) ![PyPI - Wheel](https://img.shields.io/pypi/wheel/guiscrcpy?style=flat-square) -![PyPI - Downloads](https://img.shields.io/pypi/dm/guiscrcpy?color=dark%20green&logo=PYPI&logoColor=Green&style=flat-square) -![AUR version](https://img.shields.io/aur/version/guiscrcpy?label=Arch%20Linux%20Package&style=flat-square) +![PyPI - Downloads](https://img.shields.io/pypi/dm/guiscrcpy?color=dark%20green&logo=PYPI&logoColor=Green&style=flat-square)](https://pypi.org/project/guiscrcpy) +[![AUR version](https://img.shields.io/aur/version/guiscrcpy?label=Arch%20Linux%20Package&style=flat-square)](https://aur.archlinux.org/packages/guiscrcpy) [![Snap Status](https://build.snapcraft.io/badge/srevinsaju/guiscrcpy.svg)](https://build.snapcraft.io/user/srevinsaju/guiscrcpy) -![GitHub All Releases](https://img.shields.io/github/downloads/srevinsaju/guiscrcpy/total?style=flat-square) +[![GitHub All Releases](https://img.shields.io/github/downloads/srevinsaju/guiscrcpy/total?style=flat-square)](https://github.com/srevinsaju/guiscrcpy/releases) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -![Twitter Follow](https://img.shields.io/twitter/follow/srevinsaju?style=social) -![GitHub followers](https://img.shields.io/github/followers/srevinsaju?label=srevin%20Saju&style=social) +[![Twitter Follow](https://img.shields.io/twitter/follow/srevinsaju?style=social)](https://twitter.com/srevinsaju) +[![GitHub followers](https://img.shields.io/github/followers/srevinsaju?label=srevin%20Saju&style=social)](https://github.com/srevinsaju) > **IMPORTANT** : `guiscrcpy` is a free and open source android screen mirroring system. The work on guiscrcpy is driven by the interest of users into it. Please feel free to let you know your thanks if this software helped you a lot, or if you like @@ -27,12 +27,12 @@ some more features to be included, and paticularly ... [![Become a Patron](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/srevinsaju?fan_landing=true) For beta Windows compiled executables, click -![Windows Executable](https://github.com/srevinsaju/guiscrcpy/workflows/Windows%20Executable/badge.svg) +[![Windows Executable](https://github.com/srevinsaju/guiscrcpy/workflows/Windows%20Executable/badge.svg)](https://github.com/srevinsaju/guiscrcpy/actions?query=+event%3Apush++is%3Asuccess+branch%3Amaster+workflow%3A%22Windows+Executable%22). Select the latest commit and download the artifact. -For beta Linux compiled AppImages, click +~~For beta Linux compiled AppImages, click ![Build AppImage](https://github.com/srevinsaju/guiscrcpy/workflows/Build%20AppImage/badge.svg) -and download the artifact. +and download the artifact.~~. See Issues for the failure of creating a AppImage ![image of guiscrcpy](https://raw.githubusercontent.com/srevinsaju/guiscrcpy-docs/master/docs/screen3.png) diff --git a/guiscrcpy.desktop b/guiscrcpy.desktop index 748c7723..7a9c5f41 100644 --- a/guiscrcpy.desktop +++ b/guiscrcpy.desktop @@ -1,9 +1,10 @@ [Desktop Entry] Name=guiscrcpy +Version=3.5 Exec=python3 bin/guiscrcpy Type=Application Icon=guiscrcpy_logo Terminal=false Categories=Application;Development; Keywords=Python;Screen;Mirroring;Android -StartupWMClass=guiscrcpy \ No newline at end of file +StartupWMClass=guiscrcpy diff --git a/guiscrcpy/launcher.py b/guiscrcpy/launcher.py index 5b151ae3..21487b72 100644 --- a/guiscrcpy/launcher.py +++ b/guiscrcpy/launcher.py @@ -205,10 +205,6 @@ def __init__(self): except: pass - # show subwindows - self.swipe_instance = SwipeUX() # Load swipe UI - self.panel_instance = Panel() - self.side_instance = InterfaceToolkit() self.quit.clicked.connect(self.quitAct) self.dimensionText.setText("DEFAULT") config['bitrate'] = int(self.dial.value()) @@ -337,40 +333,40 @@ def start_act(self): self.progressBar.setValue(5) devices_list = adb.devices(adb.path) - import pdb; pdb.set_trace() - if devices_list[0] == "\n": - self.runningNot.setText("DEVICE IS NOT CONNECTED") - self.progressBar.setValue(0) - return 0 - try: - exc = devices_list[1].find("device") - except IndexError: + + if len(devices_list) == 0: self.runningNot.setText("DEVICE IS NOT CONNECTED") self.progressBar.setValue(0) return 0 - - if exc > -1: - self.runningNot.setText( - "DEVICE " + str(devices_list[0]) + " IS CONNECTED") - self.progressBar.setValue(10) - - elif devices_list[1][:-1] == "unauthorized": + else: + valid_devices = [] + invalid_devices = [] + for dev, stat in devices_list: + if stat == "unauthorized": + invalid_devices.append(f"{dev} IS UNAUTHORIZED. CLICK 'ok' when asked.") + elif stat == "device": + valid_devices.append(dev) + else: + invalid_devices.append(f"{dev} is connected. Failed to establish connection") self.runningNot.setText( - "DEVICE IS UNAUTHORIZED. PLEASE CLICK 'OK' ON DEVICE WHEN ASKED FOR" + "Connected: [{}], {}".format(valid_devices, invalid_devices) ) - self.progressBar.setValue(0) - return 0 + if len(valid_devices) > 1: + if self.devices_combox.currentText() == '' or self.devices_combox.currentText().isspace(): + logging.info("Found more than one device. Please select device in drop down box") + self.runningNot.setText("Found more than one device. Please select device in drop down box") + self.devices_combox.clear() + self.devices_combox.addItems([f"{x[0]} : {x[1]}" for x in devices_list]) + return 0 + else: + more_devices = True + device_id = self.devices_combox.currentText().split(":")[0].strip() else: - self.runningNot.setText( - "DEVICE CONNECTED BUT FAILED TO ESTABLISH CONNECTION" - ) - self.progressBar.setValue(0) - return 0 - # check if the defaultDimension is checked or not for giving signal + more_devices = False + device_id = None - ux = UXMapper() - dimValues = adb.get_dimensions(adb.path) + # check if the defaultDimension is checked or not for giving signal self.progressBar.setValue(15) @@ -432,16 +428,26 @@ def start_act(self): logging.debug("Flags passed to scrcpy engine : " + self.options) self.progressBar.setValue(75) config['extra'] = self.flaglineedit.text() - self.swipe_instance.init() # show Swipe UI - self.panel_instance.init() - self.side_instance.init() + + ux = UXMapper() + # show subwindows + swipe_instance = SwipeUX() # Load swipe UI + panel_instance = Panel() + side_instance = InterfaceToolkit() + dimValues = adb.get_dimensions(adb.path) + + for instance in (swipe_instance, panel_instance, side_instance): + instance.init() + if self.cmx is not None: config['cmx'] = ' '.join(map(str, self.cmx)) - # run scrcpy usng subprocess args = "{} {} {}".format(self.options, config['extra'], config['cmx']) - scrcpy.start(scrcpy.path, args) + if more_devices: + args = f"-s {device_id} " + args + + scrcpy.start(scrcpy.path, args) timef = time.time() eta = timef - timei print("SCRCPY is launched in", eta, "seconds") diff --git a/guiscrcpy/lib/check.py b/guiscrcpy/lib/check.py index e0f94e16..3b4da226 100644 --- a/guiscrcpy/lib/check.py +++ b/guiscrcpy/lib/check.py @@ -73,20 +73,26 @@ def check(): environment.paths())) @staticmethod - def shell_input(path, command): - shellx = Popen( - _("{} shell input {}".format(path, command)), - stdout=PIPE, - stderr=PIPE, - ) + def shell_input(path, command, device_id=None): + if device_id: + shellx = Popen( + _("{} -s {} shell input {}".format(path, device_id, command)), + stdout=PIPE, + stderr=PIPE, + ) + else: + shellx = Popen( + _("{} shell input {}".format(path, command)), + stdout=PIPE, + stderr=PIPE, + ) @staticmethod - def get_dimensions(path): - shellx = Popen( - _("{} shell wm size".format(path)), - stdout=PIPE, - stderr=PIPE, - ) + def get_dimensions(path, device_id=None): + if device_id: + shellx = Popen(_("{} -s {} shell wm size".format(path, device_id)), stdout=PIPE, stderr=PIPE) + else: + shellx = Popen(_("{} shell wm size".format(path)), stdout=PIPE, stderr=PIPE) raw_dimensions = shellx.stdout.read().decode().strip('\n') for i in ['Override size', 'Physical size']: if i in raw_dimensions: @@ -101,21 +107,19 @@ def get_dimensions(path): return False @staticmethod - def shell(path, command): - shellx = Popen( - _("{} shell {}".format(path, command)), - stdout=PIPE, - stderr=PIPE, - ) + def shell(path, command, device_id=None): + if device_id: + shellx = Popen(_("{} -s {} shell {}".format(path, device_id, command)), stdout=PIPE, stderr=PIPE) + else: + shellx = Popen(_("{} shell {}".format(path, command)), stdout=PIPE, stderr=PIPE) return True @staticmethod - def command(path, command): - shellx = Popen( - _("{} {}".format(path, command)), - stdout=PIPE, - stderr=PIPE, - ) + def command(path, command, device_id=None): + if device_id: + shellx = Popen(_("{} -s {} {}".format(path, device_id, command)), stdout=PIPE, stderr=PIPE) + else: + shellx = Popen(_("{} {}".format(path, command)), stdout=PIPE, stderr=PIPE) return shellx @staticmethod diff --git a/guiscrcpy/lib/toolkit.py b/guiscrcpy/lib/toolkit.py index 9daa781a..55903296 100644 --- a/guiscrcpy/lib/toolkit.py +++ b/guiscrcpy/lib/toolkit.py @@ -33,18 +33,19 @@ class UXMapper: - def __init__(self): + def __init__(self, device_id=None): logging.debug("Launching UX Mapper") self.has_modules = getWindowsWithTitle and auto logging.debug("Calculating Screen Size") - self.android_dimensions = adb.get_dimensions(adb.path) + self.android_dimensions = adb.get_dimensions(adb.path, device_id=device_id) + self.deviceId = device_id def do_swipe(self, x1=10, y1=10, x2=10, y2=10): - adb.shell_input(adb.path, "swipe {} {} {} {}".format(x1, y1, x2, y2)) + adb.shell_input(adb.path, "swipe {} {} {} {}".format(x1, y1, x2, y2), device_id=self.deviceId) return True def do_keyevent(self, key): - adb.shell_input(adb.path, "keyevent {}".format(key)) + adb.shell_input(adb.path, "keyevent {}".format(key), device_id=self.deviceId) return True def copy_devpc(self): diff --git a/guiscrcpy/lib/ver.py b/guiscrcpy/lib/ver.py index b6be26e9..0d16be75 100644 --- a/guiscrcpy/lib/ver.py +++ b/guiscrcpy/lib/ver.py @@ -17,8 +17,8 @@ along with this program. If not, see . """ - __version__ = '3.7-raw' + import logging try: import git diff --git a/guiscrcpy/ui/main.py b/guiscrcpy/ui/main.py index 3d8d738f..c9ad0daa 100644 --- a/guiscrcpy/ui/main.py +++ b/guiscrcpy/ui/main.py @@ -7,6 +7,7 @@ # WARNING! All changes made in this file will be lost! +from . import rsrc_rc from PyQt5 import QtCore, QtGui, QtWidgets @@ -17,7 +18,8 @@ def setupUi(self, MainWindow): sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMinimumSize(QtCore.QSize(500, 420)) font = QtGui.QFont() @@ -25,73 +27,76 @@ def setupUi(self, MainWindow): font.setPointSize(10) MainWindow.setFont(font) icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(":/res/ui/guiscrcpy_logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap(":/res/ui/guiscrcpy_logo.png"), + QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setStyleSheet("QPushButton {\n" -"border-radius: 10px;\n" -" background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 255, 255, 255), stop:1 rgba(0, 255, 152, 255));\n" -"color: rgb(0, 0, 0);\n" -"}\n" -"QPushButton:pressed {\n" -"border-radius: 10px;\n" -"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 255, 255, 255), stop:1 rgba(0, 255, 152, 255));\n" -"color: rgb(0, 0, 0);\n" -"}\n" -".QPushButton:hover {\n" -"border-radius: 10px;\n" -" background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 199, 199, 255), stop:1 rgba(0, 190, 113, 255));\n" -"color: rgb(0, 0, 0);\n" -" }\n" -".QPushButton#quit{\n" -" background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(255, 0, 0, 255), stop:1 rgba(255, 155, 0, 255));\n" -"color: rgb(0, 0, 0);\n" -"border-radius: 10px;\n" -" }\n" -".QPushButton#quit:hover{ \n" -" background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(172, 0, 0, 255), stop:1 rgba(175, 106, 0, 255));\n" -"color: rgb(0, 0, 0);\n" -"border-radius: 10px;\n" -" }\n" -".QPushButton#usbaud{\n" -"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 0, 255, 255), stop:0.901961 rgba(152, 0, 255, 255));\n" -"color: rgb(0, 0, 0);\n" -"border-radius: 10px;\n" -"}\n" -".QPushButton#usbaud:hover{ \n" -" background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(172, 0, 0, 255), stop:1 rgba(175, 106, 0, 255));\n" -"color: rgb(0, 0, 0);\n" -"border-radius: 10px;\n" -"}\n" -".QPushButton#mapnow{\n" -"background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(253, 0, 255, 255), stop:0.990196 rgba(88, 0, 255, 255));\n" -"color: rgb(0, 0, 0);\n" -"border-radius: 10px;\n" -" }\n" -".QPushButton#mapnow{\n" -"background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(199, 0, 255, 255), stop:0.990196 rgba(88, 0, 255, 255));\n" -"color: rgb(0, 0, 0);\n" -"border-radius: 10px;\n" -"}\n" -".QPushButton#network_button{\n" -"background-color: rgb(60, 60, 60);\n" -"color: rgb(0, 0, 0);\n" -"border-radius: 10px; \n" -" }\n" -"\n" -".QPushButton#settings_button{\n" -"background-color: rgb(60, 60, 60);\n" -"color: rgb(0, 0, 0);\n" -"border-radius: 10px; \n" -" }\n" -"\n" -"") + "border-radius: 10px;\n" + " background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 255, 255, 255), stop:1 rgba(0, 255, 152, 255));\n" + "color: rgb(0, 0, 0);\n" + "}\n" + "QPushButton:pressed {\n" + "border-radius: 10px;\n" + "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 255, 255, 255), stop:1 rgba(0, 255, 152, 255));\n" + "color: rgb(0, 0, 0);\n" + "}\n" + ".QPushButton:hover {\n" + "border-radius: 10px;\n" + " background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 199, 199, 255), stop:1 rgba(0, 190, 113, 255));\n" + "color: rgb(0, 0, 0);\n" + " }\n" + ".QPushButton#quit{\n" + " background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(255, 0, 0, 255), stop:1 rgba(255, 155, 0, 255));\n" + "color: rgb(0, 0, 0);\n" + "border-radius: 10px;\n" + " }\n" + ".QPushButton#quit:hover{ \n" + " background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(172, 0, 0, 255), stop:1 rgba(175, 106, 0, 255));\n" + "color: rgb(0, 0, 0);\n" + "border-radius: 10px;\n" + " }\n" + ".QPushButton#usbaud{\n" + "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 0, 255, 255), stop:0.901961 rgba(152, 0, 255, 255));\n" + "color: rgb(0, 0, 0);\n" + "border-radius: 10px;\n" + "}\n" + ".QPushButton#usbaud:hover{ \n" + " background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(172, 0, 0, 255), stop:1 rgba(175, 106, 0, 255));\n" + "color: rgb(0, 0, 0);\n" + "border-radius: 10px;\n" + "}\n" + ".QPushButton#mapnow{\n" + "background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(253, 0, 255, 255), stop:0.990196 rgba(88, 0, 255, 255));\n" + "color: rgb(0, 0, 0);\n" + "border-radius: 10px;\n" + " }\n" + ".QPushButton#mapnow{\n" + "background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(199, 0, 255, 255), stop:0.990196 rgba(88, 0, 255, 255));\n" + "color: rgb(0, 0, 0);\n" + "border-radius: 10px;\n" + "}\n" + ".QPushButton#network_button{\n" + "background-color: rgb(60, 60, 60);\n" + "color: rgb(0, 0, 0);\n" + "border-radius: 10px; \n" + " }\n" + "\n" + ".QPushButton#settings_button{\n" + "background-color: rgb(60, 60, 60);\n" + "color: rgb(0, 0, 0);\n" + "border-radius: 10px; \n" + " }\n" + "\n" + "") MainWindow.setUnifiedTitleAndToolBarOnMac(False) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(24) sizePolicy.setVerticalStretch(25) - sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setMinimumSize(QtCore.QSize(500, 300)) self.centralwidget.setStyleSheet("") @@ -101,13 +106,16 @@ def setupUi(self, MainWindow): self.frame = QtWidgets.QFrame(self.centralwidget) self.frame.setObjectName("frame") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.frame) - self.horizontalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) + self.horizontalLayout_2.setSizeConstraint( + QtWidgets.QLayout.SetMaximumSize) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label_4 = QtWidgets.QLabel(self.frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.label_4.sizePolicy().hasHeightForWidth()) self.label_4.setSizePolicy(sizePolicy) self.label_4.setMinimumSize(QtCore.QSize(60, 60)) self.label_4.setMaximumSize(QtCore.QSize(60, 60)) @@ -117,14 +125,17 @@ def setupUi(self, MainWindow): self.label_4.setObjectName("label_4") self.horizontalLayout_2.addWidget(self.label_4) self.verticalLayout_2 = QtWidgets.QVBoxLayout() - self.verticalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) + self.verticalLayout_2.setSizeConstraint( + QtWidgets.QLayout.SetMaximumSize) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.label_3 = QtWidgets.QLabel(self.frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Titillium Web") @@ -137,10 +148,12 @@ def setupUi(self, MainWindow): self.label_3.setObjectName("label_3") self.verticalLayout_2.addWidget(self.label_3) self.build_label = QtWidgets.QLabel(self.frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.build_label.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.build_label.sizePolicy().hasHeightForWidth()) self.build_label.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Titillium Web") @@ -151,10 +164,12 @@ def setupUi(self, MainWindow): self.horizontalLayout_2.addLayout(self.verticalLayout_2) self.gridLayout_5.addWidget(self.frame, 0, 0, 1, 1) self.frame1 = QtWidgets.QFrame(self.centralwidget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.frame1.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.frame1.sizePolicy().hasHeightForWidth()) self.frame1.setSizePolicy(sizePolicy) self.frame1.setObjectName("frame1") self.verticalLayout = QtWidgets.QVBoxLayout(self.frame1) @@ -182,10 +197,12 @@ def setupUi(self, MainWindow): self.fullscreen.setObjectName("fullscreen") self.gridLayout_4.addWidget(self.fullscreen, 0, 4, 1, 1) self.showTouches = QtWidgets.QCheckBox(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.showTouches.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.showTouches.sizePolicy().hasHeightForWidth()) self.showTouches.setSizePolicy(sizePolicy) self.showTouches.setMinimumSize(QtCore.QSize(10, 20)) font = QtGui.QFont() @@ -193,7 +210,8 @@ def setupUi(self, MainWindow): font.setPointSize(10) self.showTouches.setFont(font) icon2 = QtGui.QIcon() - icon2.addPixmap(QtGui.QPixmap(":/icons/icons/hand-finger-pointing-down.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon2.addPixmap(QtGui.QPixmap( + ":/icons/icons/hand-finger-pointing-down.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.showTouches.setIcon(icon2) self.showTouches.setObjectName("showTouches") self.gridLayout_4.addWidget(self.showTouches, 0, 5, 1, 1) @@ -210,10 +228,12 @@ def setupUi(self, MainWindow): self.settings_button.setObjectName("settings_button") self.gridLayout_4.addWidget(self.settings_button, 3, 1, 1, 1) self.notifChecker = QtWidgets.QCheckBox(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.notifChecker.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.notifChecker.sizePolicy().hasHeightForWidth()) self.notifChecker.setSizePolicy(sizePolicy) self.notifChecker.setMinimumSize(QtCore.QSize(10, 20)) font = QtGui.QFont() @@ -222,7 +242,8 @@ def setupUi(self, MainWindow): self.notifChecker.setFont(font) self.notifChecker.setToolTipDuration(2) icon4 = QtGui.QIcon() - icon4.addPixmap(QtGui.QPixmap(":/icons/icons/bell-musical-tool.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon4.addPixmap(QtGui.QPixmap( + ":/icons/icons/bell-musical-tool.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.notifChecker.setIcon(icon4) self.notifChecker.setObjectName("notifChecker") self.gridLayout_4.addWidget(self.notifChecker, 1, 4, 1, 1) @@ -262,10 +283,12 @@ def setupUi(self, MainWindow): self.gridLayout_4.addWidget(self.aotop, 0, 0, 1, 4) self.recScui = QtWidgets.QCheckBox(self.frame1) self.recScui.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.recScui.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.recScui.sizePolicy().hasHeightForWidth()) self.recScui.setSizePolicy(sizePolicy) self.recScui.setMinimumSize(QtCore.QSize(10, 20)) font = QtGui.QFont() @@ -318,10 +341,12 @@ def setupUi(self, MainWindow): self.gridLayout_4.addWidget(self.refreshdevices, 3, 5, 1, 1) self.verticalLayout.addLayout(self.gridLayout_4) self.runningNot = QtWidgets.QPushButton(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.runningNot.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.runningNot.sizePolicy().hasHeightForWidth()) self.runningNot.setSizePolicy(sizePolicy) self.runningNot.setText("") self.runningNot.setObjectName("runningNot") @@ -330,10 +355,12 @@ def setupUi(self, MainWindow): self.gridLayout_3.setSpacing(0) self.gridLayout_3.setObjectName("gridLayout_3") self.bitrateText = QtWidgets.QLabel(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.bitrateText.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.bitrateText.sizePolicy().hasHeightForWidth()) self.bitrateText.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Titillium Web") @@ -343,19 +370,21 @@ def setupUi(self, MainWindow): self.bitrateText.setFont(font) self.bitrateText.setStatusTip("") self.bitrateText.setStyleSheet("color: rgb(0, 0, 0);\n" -"border-radius: 10px;\n" -"\n" -"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 255, 255, 255), stop:1 rgba(0, 255, 0, 255));") + "border-radius: 10px;\n" + "\n" + "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 255, 255, 255), stop:1 rgba(0, 255, 0, 255));") self.bitrateText.setTextFormat(QtCore.Qt.AutoText) self.bitrateText.setAlignment(QtCore.Qt.AlignCenter) self.bitrateText.setObjectName("bitrateText") self.gridLayout_3.addWidget(self.bitrateText, 1, 1, 1, 1) self.dimensionSlider = QtWidgets.QSlider(self.frame1) self.dimensionSlider.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.dimensionSlider.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.dimensionSlider.sizePolicy().hasHeightForWidth()) self.dimensionSlider.setSizePolicy(sizePolicy) self.dimensionSlider.setStyleSheet("color: rgb(255, 255, 255);") self.dimensionSlider.setMinimum(320) @@ -365,10 +394,12 @@ def setupUi(self, MainWindow): self.dimensionSlider.setObjectName("dimensionSlider") self.gridLayout_3.addWidget(self.dimensionSlider, 2, 2, 1, 1) self.dial = QtWidgets.QDial(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.dial.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.dial.sizePolicy().hasHeightForWidth()) self.dial.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Trebuchet MS") @@ -377,11 +408,11 @@ def setupUi(self, MainWindow): self.dial.setCursor(QtGui.QCursor(QtCore.Qt.SizeHorCursor)) self.dial.setToolTipDuration(2) self.dial.setStyleSheet("background-color: rgb(0, 255, 255);\n" -"color: rgb(255, 0, 127);\n" -"gridline-color: rgb(255, 0, 0);\n" -"selection-background-color: rgb(12, 255, 0);\n" -"\n" -"image: url(:/res/ui/guiscrcpy_logo.png);") + "color: rgb(255, 0, 127);\n" + "gridline-color: rgb(255, 0, 0);\n" + "selection-background-color: rgb(12, 255, 0);\n" + "\n" + "image: url(:/res/ui/guiscrcpy_logo.png);") self.dial.setMinimum(64) self.dial.setMaximum(16000) self.dial.setSingleStep(2) @@ -395,10 +426,12 @@ def setupUi(self, MainWindow): self.dial.setObjectName("dial") self.gridLayout_3.addWidget(self.dial, 0, 0, 3, 1) self.label = QtWidgets.QLabel(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Titillium Web") @@ -407,10 +440,12 @@ def setupUi(self, MainWindow): self.label.setObjectName("label") self.gridLayout_3.addWidget(self.label, 0, 1, 1, 1) self.dimensionDefaultCheckbox = QtWidgets.QCheckBox(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.dimensionDefaultCheckbox.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.dimensionDefaultCheckbox.sizePolicy().hasHeightForWidth()) self.dimensionDefaultCheckbox.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Titillium Web") @@ -423,10 +458,12 @@ def setupUi(self, MainWindow): self.dimensionDefaultCheckbox.setObjectName("dimensionDefaultCheckbox") self.gridLayout_3.addWidget(self.dimensionDefaultCheckbox, 0, 2, 1, 1) self.dimensionText = QtWidgets.QLabel(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.dimensionText.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.dimensionText.sizePolicy().hasHeightForWidth()) self.dimensionText.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Titillium Web") @@ -437,19 +474,21 @@ def setupUi(self, MainWindow): self.dimensionText.setToolTipDuration(2) self.dimensionText.setStatusTip("") self.dimensionText.setStyleSheet("color: rgb(255, 255, 255);\n" -"background-color: rgb(17, 17, 17);\n" -"border-radius: 10px;\n" -"") + "background-color: rgb(17, 17, 17);\n" + "border-radius: 10px;\n" + "") self.dimensionText.setTextFormat(QtCore.Qt.AutoText) self.dimensionText.setAlignment(QtCore.Qt.AlignCenter) self.dimensionText.setObjectName("dimensionText") self.gridLayout_3.addWidget(self.dimensionText, 1, 2, 1, 1) self.verticalLayout.addLayout(self.gridLayout_3) self.flaglineedit = QtWidgets.QLineEdit(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.flaglineedit.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.flaglineedit.sizePolicy().hasHeightForWidth()) self.flaglineedit.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Courier 10 Pitch") @@ -461,10 +500,12 @@ def setupUi(self, MainWindow): self.horizontalLayout.setSpacing(5) self.horizontalLayout.setObjectName("horizontalLayout") self.quit = QtWidgets.QPushButton(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.quit.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.quit.sizePolicy().hasHeightForWidth()) self.quit.setSizePolicy(sizePolicy) self.quit.setMinimumSize(QtCore.QSize(45, 45)) self.quit.setStyleSheet("") @@ -475,10 +516,12 @@ def setupUi(self, MainWindow): self.quit.setObjectName("quit") self.horizontalLayout.addWidget(self.quit) self.pushButton = QtWidgets.QPushButton(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.pushButton.sizePolicy().hasHeightForWidth()) self.pushButton.setSizePolicy(sizePolicy) self.pushButton.setMinimumSize(QtCore.QSize(45, 45)) font = QtGui.QFont() @@ -490,10 +533,12 @@ def setupUi(self, MainWindow): self.pushButton.setObjectName("pushButton") self.horizontalLayout.addWidget(self.pushButton) self.abtgit = QtWidgets.QPushButton(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.abtgit.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.abtgit.sizePolicy().hasHeightForWidth()) self.abtgit.setSizePolicy(sizePolicy) self.abtgit.setMinimumSize(QtCore.QSize(45, 45)) self.abtgit.setText("") @@ -504,10 +549,12 @@ def setupUi(self, MainWindow): self.abtgit.setObjectName("abtgit") self.horizontalLayout.addWidget(self.abtgit) self.abtme = QtWidgets.QPushButton(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.abtme.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.abtme.sizePolicy().hasHeightForWidth()) self.abtme.setSizePolicy(sizePolicy) self.abtme.setMinimumSize(QtCore.QSize(33, 45)) self.abtme.setText("") @@ -518,10 +565,12 @@ def setupUi(self, MainWindow): self.abtme.setObjectName("abtme") self.horizontalLayout.addWidget(self.abtme) self.usbaud = QtWidgets.QPushButton(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(11) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.usbaud.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.usbaud.sizePolicy().hasHeightForWidth()) self.usbaud.setSizePolicy(sizePolicy) self.usbaud.setMinimumSize(QtCore.QSize(45, 45)) self.usbaud.setText("") @@ -531,10 +580,12 @@ def setupUi(self, MainWindow): self.usbaud.setObjectName("usbaud") self.horizontalLayout.addWidget(self.usbaud) self.mapnow = QtWidgets.QPushButton(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(11) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.mapnow.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.mapnow.sizePolicy().hasHeightForWidth()) self.mapnow.setSizePolicy(sizePolicy) self.mapnow.setMinimumSize(QtCore.QSize(45, 45)) self.mapnow.setToolTipDuration(3) @@ -545,10 +596,12 @@ def setupUi(self, MainWindow): self.mapnow.setObjectName("mapnow") self.horizontalLayout.addWidget(self.mapnow) self.executeaction = QtWidgets.QPushButton(self.frame1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum) + sizePolicy = QtWidgets.QSizePolicy( + QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.executeaction.sizePolicy().hasHeightForWidth()) + sizePolicy.setHeightForWidth( + self.executeaction.sizePolicy().hasHeightForWidth()) self.executeaction.setSizePolicy(sizePolicy) self.executeaction.setMinimumSize(QtCore.QSize(45, 45)) font = QtGui.QFont() @@ -570,7 +623,8 @@ def setupUi(self, MainWindow): palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) + palette.setBrush(QtGui.QPalette.Active, + QtGui.QPalette.WindowText, brush) gradient = QtGui.QLinearGradient(0.0, 0.0, 1.0, 0.0) gradient.setSpread(QtGui.QGradient.PadSpread) gradient.setCoordinateMode(QtGui.QGradient.ObjectBoundingMode) @@ -583,7 +637,8 @@ def setupUi(self, MainWindow): palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) + palette.setBrush(QtGui.QPalette.Active, + QtGui.QPalette.ButtonText, brush) gradient = QtGui.QLinearGradient(0.0, 0.0, 1.0, 0.0) gradient.setSpread(QtGui.QGradient.PadSpread) gradient.setCoordinateMode(QtGui.QGradient.ObjectBoundingMode) @@ -600,16 +655,20 @@ def setupUi(self, MainWindow): palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(85, 255, 0)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Highlight, brush) + palette.setBrush(QtGui.QPalette.Active, + QtGui.QPalette.Highlight, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.HighlightedText, brush) + palette.setBrush(QtGui.QPalette.Active, + QtGui.QPalette.HighlightedText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 128)) brush.setStyle(QtCore.Qt.NoBrush) - palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText, brush) + palette.setBrush(QtGui.QPalette.Active, + QtGui.QPalette.PlaceholderText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) + palette.setBrush(QtGui.QPalette.Inactive, + QtGui.QPalette.WindowText, brush) gradient = QtGui.QLinearGradient(0.0, 0.0, 1.0, 0.0) gradient.setSpread(QtGui.QGradient.PadSpread) gradient.setCoordinateMode(QtGui.QGradient.ObjectBoundingMode) @@ -622,7 +681,8 @@ def setupUi(self, MainWindow): palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) + palette.setBrush(QtGui.QPalette.Inactive, + QtGui.QPalette.ButtonText, brush) gradient = QtGui.QLinearGradient(0.0, 0.0, 1.0, 0.0) gradient.setSpread(QtGui.QGradient.PadSpread) gradient.setCoordinateMode(QtGui.QGradient.ObjectBoundingMode) @@ -639,16 +699,20 @@ def setupUi(self, MainWindow): palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(85, 255, 0)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Highlight, brush) + palette.setBrush(QtGui.QPalette.Inactive, + QtGui.QPalette.Highlight, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.HighlightedText, brush) + palette.setBrush(QtGui.QPalette.Inactive, + QtGui.QPalette.HighlightedText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 128)) brush.setStyle(QtCore.Qt.NoBrush) - palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush) + palette.setBrush(QtGui.QPalette.Inactive, + QtGui.QPalette.PlaceholderText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) + palette.setBrush(QtGui.QPalette.Disabled, + QtGui.QPalette.WindowText, brush) gradient = QtGui.QLinearGradient(0.0, 0.0, 1.0, 0.0) gradient.setSpread(QtGui.QGradient.PadSpread) gradient.setCoordinateMode(QtGui.QGradient.ObjectBoundingMode) @@ -661,7 +725,8 @@ def setupUi(self, MainWindow): palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) + palette.setBrush(QtGui.QPalette.Disabled, + QtGui.QPalette.ButtonText, brush) gradient = QtGui.QLinearGradient(0.0, 0.0, 1.0, 0.0) gradient.setSpread(QtGui.QGradient.PadSpread) gradient.setCoordinateMode(QtGui.QGradient.ObjectBoundingMode) @@ -678,23 +743,26 @@ def setupUi(self, MainWindow): palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(85, 255, 0)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Highlight, brush) + palette.setBrush(QtGui.QPalette.Disabled, + QtGui.QPalette.Highlight, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) - palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.HighlightedText, brush) + palette.setBrush(QtGui.QPalette.Disabled, + QtGui.QPalette.HighlightedText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 128)) brush.setStyle(QtCore.Qt.NoBrush) - palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.PlaceholderText, brush) + palette.setBrush(QtGui.QPalette.Disabled, + QtGui.QPalette.PlaceholderText, brush) self.progressBar.setPalette(palette) font = QtGui.QFont() font.setFamily("Titillium Web") font.setPointSize(10) self.progressBar.setFont(font) self.progressBar.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 255, 255, 255), stop:1 rgba(0, 255, 0, 255));\n" -"color: rgb(255,255,255);\n" -"selection-color: rgb(255, 255, 255);\n" -"selection-background-color: rgb(38, 255, 0);\n" -"selection-background-color: rgb(85, 255, 0);") + "color: rgb(255,255,255);\n" + "selection-color: rgb(255, 255, 255);\n" + "selection-background-color: rgb(38, 255, 0);\n" + "selection-background-color: rgb(85, 255, 0);") self.progressBar.setProperty("value", 100) self.progressBar.setObjectName("progressBar") self.verticalLayout.addWidget(self.progressBar) @@ -715,18 +783,19 @@ def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "guiscrcpy")) MainWindow.setStatusTip(_translate("MainWindow", "GUI by srevinsaju, scrcpy engine by rom1v. Hosted on GitHub\n" -" https://github.com/srevinsaju/guiscrcpy\n" -" ")) + " https://github.com/srevinsaju/guiscrcpy\n" + " ")) self.label_4.setToolTip(_translate("MainWindow", "GUI by srevinsaju, scrcpy engine by rom1v. Hosted on GitHub\n" -" https://github.com/srevinsaju/guiscrcpy\n" -" ")) + " https://github.com/srevinsaju/guiscrcpy\n" + " ")) self.label_4.setStatusTip(_translate("MainWindow", "GUI by srevinsaju, scrcpy engine by rom1v. Hosted on GitHub\n" -" https://github.com/srevinsaju/guiscrcpy\n" -" ")) + " https://github.com/srevinsaju/guiscrcpy\n" + " ")) self.label_3.setStatusTip(_translate("MainWindow", "GUI by srevinsaju, scrcpy engine by rom1v. Hosted on GitHub\n" -" https://github.com/srevinsaju/guiscrcpy\n" -" ")) - self.label_3.setText(_translate("MainWindow", "guiscrcpy ")) + " https://github.com/srevinsaju/guiscrcpy\n" + " ")) + self.label_3.setText(_translate( + "MainWindow", "guiscrcpy ")) self.build_label.setText(_translate("MainWindow", "Build")) self.fullscreen.setText(_translate("MainWindow", "Fullscreen")) self.showTouches.setText(_translate("MainWindow", "Show touches")) @@ -744,18 +813,25 @@ def retranslateUi(self, MainWindow): self.checkBox_2.setText(_translate("MainWindow", "Bottom Panel")) self.refreshdevices.setText(_translate("MainWindow", "REFRESH")) self.bitrateText.setText(_translate("MainWindow", "8000 KB/s")) - self.dial.setToolTip(_translate("MainWindow", "Changing the bitrate of the screen mirrorring. Useful to show playback at normal speed without lags")) - self.dial.setStatusTip(_translate("MainWindow", "Adjust Bitrate. Leave it untouched for defualts")) + self.dial.setToolTip(_translate( + "MainWindow", "Changing the bitrate of the screen mirrorring. Useful to show playback at normal speed without lags")) + self.dial.setStatusTip(_translate( + "MainWindow", "Adjust Bitrate. Leave it untouched for defualts")) self.label.setText(_translate("MainWindow", "Bitrate")) - self.dimensionDefaultCheckbox.setText(_translate("MainWindow", "Keep Default Dimensions")) - self.dimensionText.setToolTip(_translate("MainWindow", "Change device dimensions. scrcpy has some rendering problems upon changing dimensions")) + self.dimensionDefaultCheckbox.setText( + _translate("MainWindow", "Keep Default Dimensions")) + self.dimensionText.setToolTip(_translate( + "MainWindow", "Change device dimensions. scrcpy has some rendering problems upon changing dimensions")) self.dimensionText.setText(_translate("MainWindow", "DEFAULT")) - self.flaglineedit.setPlaceholderText(_translate("MainWindow", "Enter additional flags to pass to scrcpy")) + self.flaglineedit.setPlaceholderText(_translate( + "MainWindow", "Enter additional flags to pass to scrcpy")) self.quit.setStatusTip(_translate("MainWindow", "quit GUI")) self.pushButton.setText(_translate("MainWindow", " RESET ")) - self.mapnow.setToolTip(_translate("MainWindow", "Device Point to Key mapping launcher. Click to register keys for the first time. For the subsequent launches, the button will start key listeners")) - self.mapnow.setStatusTip(_translate("MainWindow", "Device Point to Key mapping launcher. Click to register keys for the first time. For the subsequent launches, the button will start key listeners")) - self.executeaction.setStatusTip(_translate("MainWindow", "Start Scrcpy Executable right now. Please check if Scrcpy is added to path")) + self.mapnow.setToolTip(_translate( + "MainWindow", "Device Point to Key mapping launcher. Click to register keys for the first time. For the subsequent launches, the button will start key listeners")) + self.mapnow.setStatusTip(_translate( + "MainWindow", "Device Point to Key mapping launcher. Click to register keys for the first time. For the subsequent launches, the button will start key listeners")) + self.executeaction.setStatusTip(_translate( + "MainWindow", "Start Scrcpy Executable right now. Please check if Scrcpy is added to path")) self.executeaction.setText(_translate("MainWindow", "START SCRCPY")) self.progressBar.setStatusTip(_translate("MainWindow", "Progress Bar")) -from . import rsrc_rc diff --git a/io.srevinsaju.guiscrcpy.yml b/io.srevinsaju.guiscrcpy.yml index 1ee16cb8..d03ba503 100644 --- a/io.srevinsaju.guiscrcpy.yml +++ b/io.srevinsaju.guiscrcpy.yml @@ -29,4 +29,4 @@ script: - StartupWMClass=guiscrcpy - EOF - cp usr/share/applications/io.srevinsaju.guiscrcpy.desktop . - - usr/bin/pip3 freeze | grep "mu-editor" | cut -d "=" -f 3 >> ../VERSION \ No newline at end of file + - usr/bin/pip3 freeze | grep "guiscrcpy" | cut -d "=" -f 3 >> ../VERSION diff --git a/manifest.json b/manifest.json index 43e4bb9c..8f6e917f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "guiscrcpy", - "version": "3.3", + "version": "3.5", "manifest_version": 2, "description": "Open Source Android Screen Mirroring System", @@ -10,7 +10,7 @@ "128": "/docs/img/guiscrcpy_logo.png" }, "browser_action": { - "default_title": "Guiscrcpy", + "default_title": "guiscrcpy", "default_icon": "/docs/img/guiscrcpy_logo.png" }, } diff --git a/requirements.txt b/requirements.txt index c754a0a3..f796ea97 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ fontTools - -GitPython==3.1.0 PyQt5>=5.14.2 +GitPython==3.1.1 psutil==5.7.0 pynput>=1.6 pyshortcuts==1.7 diff --git a/setup.py b/setup.py index c297fbd3..36a99e47 100755 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def gen_version(): v = "3.5.x.src.dev" -requirements = ['PyQt5==5.14.1', 'pynput', 'gitpython'] +requirements = ['PyQt5==5.14.2', 'pynput', 'gitpython'] if platform.system() == 'Windows': requirements.extend(['pywin32', 'psutil']) elif platform.system() == 'Linux': @@ -58,6 +58,9 @@ def gen_version(): author='srevinsaju', author_email="srevin03@gmail.com", packages=['guiscrcpy'], + data_files = [ + ('share/applications', ['guiscrcpy.desktop'] ) + ], url="https://srevinsaju.github.io/guiscrcpy", download_url="https://github.com/srevinsaju/guiscrcpy/archive/master.zip", package_data={'guiscrcpy': ['*', '*.*', 'resources/*', 'ui/*', 'lib/*', 'platform/*',