Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Build uic and rcc using pyside2
Browse files Browse the repository at this point in the history
  • Loading branch information
srevinsaju committed Sep 9, 2020
1 parent 8549c01 commit 627331e
Show file tree
Hide file tree
Showing 7 changed files with 85,085 additions and 173 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ pyuic5:
sed -i 's/docs\// /g' docs/README.md

pysideuic:
pyside2-rcc guiscrcpy/ui/rsrc.qrc -o guiscrcpy/ui/pyside2/rsrc_rc.py
pyside2-uic guiscrcpy/ui/mainwindow.ui -o guiscrcpy/ui/pyside2/main.py --from-imports
pyside2-uic guiscrcpy/ui/downloader.ui -o guiscrcpy/ui/pyside2/downloader.py --from-imports
pyside2-uic guiscrcpy/ui/bottompanelui.ui -o guiscrcpy/ui/pyside2/panel.py --from-imports
pyside2-uic guiscrcpy/ui/toolkit_ui.ui -o guiscrcpy/ui/pyside2/toolkit.py --from-imports
pyside2-uic guiscrcpy/ui/network.ui -o guiscrcpy/ui/pyside2/network.py --from-imports
pyside2-uic guiscrcpy/ui/settings.ui -o guiscrcpy/ui/pyside2/settings.py --from-imports
rcc --generator=python guiscrcpy/ui/rsrc.qrc -o guiscrcpy/ui/pyside2/rsrc_rc.py
uic --generator=python guiscrcpy/ui/mainwindow.ui -o guiscrcpy/ui/pyside2/main.py --from-imports
uic --generator=python guiscrcpy/ui/downloader.ui -o guiscrcpy/ui/pyside2/downloader.py --from-imports
uic --generator=python guiscrcpy/ui/bottompanelui.ui -o guiscrcpy/ui/pyside2/panel.py --from-imports
uic --generator=python guiscrcpy/ui/toolkit_ui.ui -o guiscrcpy/ui/pyside2/toolkit.py --from-imports
uic --generator=python guiscrcpy/ui/network.ui -o guiscrcpy/ui/pyside2/network.py --from-imports
uic --generator=python guiscrcpy/ui/settings.ui -o guiscrcpy/ui/pyside2/settings.py --from-imports
sed -i '/from PySide2.QtWidgets import */ifrom PySide2.QtGui import QGradient' guiscrcpy/ui/pyside2/main.py
sed -i 's/self.verticalLayout.setSpacing(0())/self.verticalLayout.setSpacing(0)/g' guiscrcpy/ui/pyside2/toolkit.py
sed -i 's/self.verticalLayout.setMargin(0())/self.verticalLayout.setMargin(0)/g' guiscrcpy/ui/pyside2/toolkit.py
Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[![AUR version](https://img.shields.io/aur/version/guiscrcpy?label=Arch%20Linux%20Package&style=flat-square)](https://aur.archlinux.org/packages/guiscrcpy)
[![guiscrcpy](https://snapcraft.io//guiscrcpy/badge.svg)](https://snapcraft.io/guiscrcpy)
[![GitHub All Releases](https://img.shields.io/github/downloads/srevinsaju/guiscrcpy/total?style=flat-square)](https://github.com/srevinsaju/guiscrcpy/releases)
![Discord](https://img.shields.io/discord/679746670422261783?label=chat%20on%20Discord&logo=discord&logoColor=white&style=flat-square)
[![Discord](https://img.shields.io/discord/679746670422261783?label=chat%20on%20Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/mFqj3a5)
[![Discord Server](https://badgen.net/badge/discord/join%20chat/7289DA?icon=discord)](https://discord.gg/mFqj3a5)

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

Expand Down
110 changes: 54 additions & 56 deletions guiscrcpy/ui/pyside2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from PySide2.QtGui import QGradient
from PySide2.QtWidgets import *

from . import rsrc_rc
from . import rsrc_rc

class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Expand Down Expand Up @@ -188,9 +188,7 @@ def setupUi(self, MainWindow):

self.check_swipe_panel = QCheckBox(self.frame)
self.check_swipe_panel.setObjectName(u"check_swipe_panel")
font2 = QFont()
font2.setPointSize(10)
self.check_swipe_panel.setFont(font2)
self.check_swipe_panel.setFont(font1)
icon4 = QIcon()
icon4.addFile(u":/icons/icons/guiscrcpy_swipe_panel.svg", QSize(), QIcon.Normal, QIcon.Off)
self.check_swipe_panel.setIcon(icon4)
Expand All @@ -215,13 +213,13 @@ def setupUi(self, MainWindow):
sizePolicy2.setHeightForWidth(self.recScui.sizePolicy().hasHeightForWidth())
self.recScui.setSizePolicy(sizePolicy2)
self.recScui.setMinimumSize(QSize(10, 20))
font3 = QFont()
font3.setFamily(u"Noto Sans")
font3.setPointSize(10)
font3.setBold(False)
font3.setItalic(False)
font3.setWeight(50)
self.recScui.setFont(font3)
font2 = QFont()
font2.setFamily(u"Noto Sans")
font2.setPointSize(10)
font2.setBold(False)
font2.setItalic(False)
font2.setWeight(50)
self.recScui.setFont(font2)
self.recScui.setToolTipDuration(2)
icon6 = QIcon()
icon6.addFile(u":/icons/icons/facetime-button.svg", QSize(), QIcon.Normal, QIcon.Off)
Expand All @@ -244,7 +242,7 @@ def setupUi(self, MainWindow):

self.lock_rotation = QCheckBox(self.frame)
self.lock_rotation.setObjectName(u"lock_rotation")
self.lock_rotation.setFont(font2)
self.lock_rotation.setFont(font1)
icon8 = QIcon()
icon8.addFile(u":/icons/icons/padlock.svg", QSize(), QIcon.Normal, QIcon.Off)
self.lock_rotation.setIcon(icon8)
Expand All @@ -253,7 +251,7 @@ def setupUi(self, MainWindow):

self.check_bottom_panel = QCheckBox(self.frame)
self.check_bottom_panel.setObjectName(u"check_bottom_panel")
self.check_bottom_panel.setFont(font2)
self.check_bottom_panel.setFont(font1)
icon9 = QIcon()
icon9.addFile(u":/icons/icons/guiscrcpy_bottom_panel.svg", QSize(), QIcon.Normal, QIcon.Off)
self.check_bottom_panel.setIcon(icon9)
Expand All @@ -276,7 +274,7 @@ def setupUi(self, MainWindow):

self.check_side_panel = QCheckBox(self.frame)
self.check_side_panel.setObjectName(u"check_side_panel")
self.check_side_panel.setFont(font2)
self.check_side_panel.setFont(font1)
icon11 = QIcon()
icon11.addFile(u":/icons/icons/guiscrcpy_side_panel.svg", QSize(), QIcon.Normal, QIcon.Off)
self.check_side_panel.setIcon(icon11)
Expand All @@ -300,6 +298,10 @@ def setupUi(self, MainWindow):
self.device_rotation.addItem("")
self.device_rotation.addItem("")
self.device_rotation.setObjectName(u"device_rotation")
font3 = QFont()
font3.setFamily(u"Noto Sans")
font3.setPointSize(11)
self.device_rotation.setFont(font3)

self.gridLayout_4.addWidget(self.device_rotation, 7, 5, 1, 1)

Expand Down Expand Up @@ -329,6 +331,7 @@ def setupUi(self, MainWindow):
self.devices_view.setSizePolicy(sizePolicy2)
self.devices_view.setMaximumSize(QSize(16777215, 90))
font4 = QFont()
font4.setFamily(u"Noto Sans")
font4.setPointSize(9)
self.devices_view.setFont(font4)
self.devices_view.setAutoFillBackground(True)
Expand All @@ -353,6 +356,7 @@ def setupUi(self, MainWindow):
self.private_message_box_adb.setObjectName(u"private_message_box_adb")
sizePolicy2.setHeightForWidth(self.private_message_box_adb.sizePolicy().hasHeightForWidth())
self.private_message_box_adb.setSizePolicy(sizePolicy2)
self.private_message_box_adb.setFont(font3)

self.verticalLayout.addWidget(self.private_message_box_adb)

Expand All @@ -364,7 +368,7 @@ def setupUi(self, MainWindow):
sizePolicy2.setHeightForWidth(self.dimensionDefaultCheckbox.sizePolicy().hasHeightForWidth())
self.dimensionDefaultCheckbox.setSizePolicy(sizePolicy2)
font5 = QFont()
font5.setFamily(u"Titillium Web")
font5.setFamily(u"Noto Sans")
font5.setPointSize(11)
font5.setBold(False)
font5.setItalic(False)
Expand All @@ -378,23 +382,20 @@ def setupUi(self, MainWindow):
self.label.setObjectName(u"label")
sizePolicy2.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy2)
font6 = QFont()
font6.setFamily(u"Titillium Web")
font6.setPointSize(11)
self.label.setFont(font6)
self.label.setFont(font3)

self.gridLayout_3.addWidget(self.label, 0, 1, 1, 1)

self.bitrateText = QLineEdit(self.frame)
self.bitrateText.setObjectName(u"bitrateText")
sizePolicy2.setHeightForWidth(self.bitrateText.sizePolicy().hasHeightForWidth())
self.bitrateText.setSizePolicy(sizePolicy2)
font7 = QFont()
font7.setFamily(u"Titillium Web")
font7.setPointSize(26)
font7.setBold(True)
font7.setWeight(75)
self.bitrateText.setFont(font7)
font6 = QFont()
font6.setFamily(u"Titillium Web")
font6.setPointSize(26)
font6.setBold(True)
font6.setWeight(75)
self.bitrateText.setFont(font6)
self.bitrateText.setStyleSheet(u"color: rgb(0, 0, 0);\n"
"border-radius: 10px;\n"
"\n"
Expand All @@ -410,10 +411,7 @@ def setupUi(self, MainWindow):
sizePolicy4.setVerticalStretch(0)
sizePolicy4.setHeightForWidth(self.dial.sizePolicy().hasHeightForWidth())
self.dial.setSizePolicy(sizePolicy4)
font8 = QFont()
font8.setFamily(u"Trebuchet MS")
font8.setPointSize(11)
self.dial.setFont(font8)
self.dial.setFont(font3)
self.dial.setCursor(QCursor(Qt.SizeHorCursor))
self.dial.setToolTipDuration(2)
self.dial.setStyleSheet(u"background-color: rgb(0, 255, 255);\n"
Expand Down Expand Up @@ -457,7 +455,7 @@ def setupUi(self, MainWindow):
self.dimensionText.setObjectName(u"dimensionText")
sizePolicy2.setHeightForWidth(self.dimensionText.sizePolicy().hasHeightForWidth())
self.dimensionText.setSizePolicy(sizePolicy2)
self.dimensionText.setFont(font7)
self.dimensionText.setFont(font6)
self.dimensionText.setStyleSheet(u"color: rgb(255, 255, 255);\n"
"background-color: rgb(17, 17, 17);\n"
"border-radius: 10px;\n"
Expand All @@ -477,9 +475,9 @@ def setupUi(self, MainWindow):
sizePolicy5.setVerticalStretch(0)
sizePolicy5.setHeightForWidth(self.flaglineedit.sizePolicy().hasHeightForWidth())
self.flaglineedit.setSizePolicy(sizePolicy5)
font9 = QFont()
font9.setFamily(u"Courier 10 Pitch")
self.flaglineedit.setFont(font9)
font7 = QFont()
font7.setFamily(u"Monospace")
self.flaglineedit.setFont(font7)

self.verticalLayout.addWidget(self.flaglineedit)

Expand Down Expand Up @@ -511,12 +509,12 @@ def setupUi(self, MainWindow):
sizePolicy7.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
self.pushButton.setSizePolicy(sizePolicy7)
self.pushButton.setMinimumSize(QSize(45, 45))
font10 = QFont()
font10.setFamily(u"Titillium Web")
font10.setPointSize(11)
font10.setBold(True)
font10.setWeight(75)
self.pushButton.setFont(font10)
font8 = QFont()
font8.setFamily(u"Titillium Web")
font8.setPointSize(11)
font8.setBold(True)
font8.setWeight(75)
self.pushButton.setFont(font8)
self.pushButton.setToolTipDuration(2)

self.horizontalLayout.addWidget(self.pushButton)
Expand Down Expand Up @@ -568,13 +566,13 @@ def setupUi(self, MainWindow):
sizePolicy5.setHeightForWidth(self.executeaction.sizePolicy().hasHeightForWidth())
self.executeaction.setSizePolicy(sizePolicy5)
self.executeaction.setMinimumSize(QSize(45, 45))
font11 = QFont()
font11.setFamily(u"Titillium Web")
font11.setPointSize(11)
font11.setBold(True)
font11.setItalic(False)
font11.setWeight(75)
self.executeaction.setFont(font11)
font9 = QFont()
font9.setFamily(u"Titillium Web")
font9.setPointSize(11)
font9.setBold(True)
font9.setItalic(False)
font9.setWeight(75)
self.executeaction.setFont(font9)
self.executeaction.setStyleSheet(u"")
icon18 = QIcon()
icon18.addFile(u":/icons/icons/small-rocket-ship-silhouette.svg", QSize(), QIcon.Normal, QIcon.Off)
Expand Down Expand Up @@ -723,13 +721,13 @@ def setupUi(self, MainWindow):
self.label_3.setObjectName(u"label_3")
sizePolicy8.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy8)
font12 = QFont()
font12.setFamily(u"Titillium Web")
font12.setPointSize(28)
font12.setBold(True)
font12.setItalic(False)
font12.setWeight(75)
self.label_3.setFont(font12)
font10 = QFont()
font10.setFamily(u"Titillium Web")
font10.setPointSize(28)
font10.setBold(True)
font10.setItalic(False)
font10.setWeight(75)
self.label_3.setFont(font10)
self.label_3.setStyleSheet(u"")

self.verticalLayout_2.addWidget(self.label_3)
Expand All @@ -738,9 +736,9 @@ def setupUi(self, MainWindow):
self.build_label.setObjectName(u"build_label")
sizePolicy5.setHeightForWidth(self.build_label.sizePolicy().hasHeightForWidth())
self.build_label.setSizePolicy(sizePolicy5)
font13 = QFont()
font13.setFamily(u"Titillium Web")
self.build_label.setFont(font13)
font11 = QFont()
font11.setFamily(u"Noto Sans")
self.build_label.setFont(font11)
self.build_label.setStyleSheet(u"color: rgb(255, 255, 255);")

self.verticalLayout_2.addWidget(self.build_label)
Expand Down
24 changes: 12 additions & 12 deletions guiscrcpy/ui/pyside2/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,35 @@ def setupUi(self, NetworkUI):
NetworkUI.resize(374, 414)
self.centralwidget = QWidget(NetworkUI)
self.centralwidget.setObjectName(u"centralwidget")
self.widget = QWidget(self.centralwidget)
self.widget.setObjectName(u"widget")
self.widget.setGeometry(QRect(2, 5, 371, 381))
self.verticalLayout = QVBoxLayout(self.widget)
self.layoutWidget = QWidget(self.centralwidget)
self.layoutWidget.setObjectName(u"layoutWidget")
self.layoutWidget.setGeometry(QRect(2, 5, 371, 381))
self.verticalLayout = QVBoxLayout(self.layoutWidget)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.label = QLabel(self.widget)
self.label = QLabel(self.layoutWidget)
self.label.setObjectName(u"label")

self.verticalLayout.addWidget(self.label)

self.gridLayout = QGridLayout()
self.gridLayout.setObjectName(u"gridLayout")
self.listView = QListWidget(self.widget)
self.listView = QListWidget(self.layoutWidget)
self.listView.setObjectName(u"listView")

self.gridLayout.addWidget(self.listView, 0, 0, 1, 2)

self.nm_refresh = QPushButton(self.widget)
self.nm_refresh = QPushButton(self.layoutWidget)
self.nm_refresh.setObjectName(u"nm_refresh")

self.gridLayout.addWidget(self.nm_refresh, 5, 0, 1, 1)

self.tcpip = QPushButton(self.widget)
self.tcpip = QPushButton(self.layoutWidget)
self.tcpip.setObjectName(u"tcpip")

self.gridLayout.addWidget(self.tcpip, 4, 1, 1, 1)

self.spinBox = QSpinBox(self.widget)
self.spinBox = QSpinBox(self.layoutWidget)
self.spinBox.setObjectName(u"spinBox")
font = QFont()
font.setBold(True)
Expand All @@ -65,18 +65,18 @@ def setupUi(self, NetworkUI):

self.gridLayout.addWidget(self.spinBox, 4, 0, 1, 1)

self.nm_connect = QPushButton(self.widget)
self.nm_connect = QPushButton(self.layoutWidget)
self.nm_connect.setObjectName(u"nm_connect")

self.gridLayout.addWidget(self.nm_connect, 5, 1, 1, 1)

self.nm_det = QPushButton(self.widget)
self.nm_det = QPushButton(self.layoutWidget)
self.nm_det.setObjectName(u"nm_det")
self.nm_det.setEnabled(False)

self.gridLayout.addWidget(self.nm_det, 2, 0, 1, 2)

self.lineEdit = QLineEdit(self.widget)
self.lineEdit = QLineEdit(self.layoutWidget)
self.lineEdit.setObjectName(u"lineEdit")

self.gridLayout.addWidget(self.lineEdit, 1, 0, 1, 2)
Expand Down
1 change: 1 addition & 0 deletions guiscrcpy/ui/pyside2/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def setupUi(self, HorizontalPanel):
self.label.setObjectName(u"label")
self.label.setGeometry(QRect(0, -10, 20, 41))
font = QFont()
font.setFamily(u"Noto Sans")
font.setPointSize(18)
font.setBold(True)
font.setWeight(75)
Expand Down
Loading

0 comments on commit 627331e

Please sign in to comment.