summarylogtreecommitdiffstats
path: root/0001-Replace_pyqt4_to_pyqt5_as_depends.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-Replace_pyqt4_to_pyqt5_as_depends.patch')
-rw-r--r--0001-Replace_pyqt4_to_pyqt5_as_depends.patch25
1 files changed, 14 insertions, 11 deletions
diff --git a/0001-Replace_pyqt4_to_pyqt5_as_depends.patch b/0001-Replace_pyqt4_to_pyqt5_as_depends.patch
index 512ac1ca87cd..813295888225 100644
--- a/0001-Replace_pyqt4_to_pyqt5_as_depends.patch
+++ b/0001-Replace_pyqt4_to_pyqt5_as_depends.patch
@@ -1,12 +1,13 @@
-diff -ura --color musicbox-0.2.5.4/NEMbox/osdlyrics.py musicbox-0.2.5.4.new/NEMbox/osdlyrics.py
---- musicbox-0.2.5.4/NEMbox/osdlyrics.py 2018-11-28 15:23:07.000000000 +0900
-+++ musicbox-0.2.5.4.new/NEMbox/osdlyrics.py 2018-12-27 22:17:27.205920448 +0900
-@@ -19,16 +19,16 @@
+diff --unified --recursive --text musicbox-0.3.0/NEMbox/osdlyrics.py musicbox-0.3.0.new/NEMbox/osdlyrics.py
+--- musicbox-0.3.0/NEMbox/osdlyrics.py 2020-10-23 19:52:11.000000000 +0800
++++ musicbox-0.3.0.new/NEMbox/osdlyrics.py 2020-11-05 19:16:55.152042882 +0800
+@@ -13,17 +13,17 @@
config = Config()
try:
- from PyQt4 import QtGui, QtCore, QtDBus
+ from PyQt5 import QtGui, QtWidgets, QtCore, QtDBus
+
pyqt_activity = True
except ImportError:
pyqt_activity = False
@@ -18,15 +19,16 @@ diff -ura --color musicbox-0.2.5.4/NEMbox/osdlyrics.py musicbox-0.2.5.4.new/NEMb
- class Lyrics(QtGui.QWidget):
+ class Lyrics(QtWidgets.QWidget):
-
def __init__(self):
super(Lyrics, self).__init__()
-@@ -52,10 +52,10 @@
+ self.__dbusAdaptor = LyricsAdapter(self)
+@@ -47,11 +47,10 @@
self.setMinimumSize(600, 50)
osdlyrics_size = config.get("osdlyrics_size")
self.resize(osdlyrics_size[0], osdlyrics_size[1])
- scn = QtGui.QApplication.desktop().screenNumber(
-- QtGui.QApplication.desktop().cursor().pos())
+- QtGui.QApplication.desktop().cursor().pos()
+- )
- bl = QtGui.QApplication.desktop().screenGeometry(scn).bottomLeft()
- br = QtGui.QApplication.desktop().screenGeometry(scn).bottomRight()
+ scn = QtWidgets.QApplication.desktop().screenNumber(
@@ -36,12 +38,13 @@ diff -ura --color musicbox-0.2.5.4/NEMbox/osdlyrics.py musicbox-0.2.5.4.new/NEMb
bc = (bl + br) / 2
frameGeo = self.frameGeometry()
frameGeo.moveCenter(bc)
-@@ -114,7 +114,7 @@
+@@ -112,8 +111,7 @@
+ self.parent().repaint()
def show_lyrics():
-
+-
- app = QtGui.QApplication(sys.argv)
+ app = QtWidgets.QApplication(sys.argv)
lyrics = Lyrics()
- QtDBus.QDBusConnection.sessionBus().registerService('org.musicbox.Bus')
- QtDBus.QDBusConnection.sessionBus().registerObject('/', lyrics)
+ QtDBus.QDBusConnection.sessionBus().registerService("org.musicbox.Bus")
+ QtDBus.QDBusConnection.sessionBus().registerObject("/", lyrics)