diff --git a/README.md b/README.md
index 6c04939..be847e2 100644
--- a/README.md
+++ b/README.md
@@ -79,3 +79,4 @@ player->play();
- database playlist autoexporting
- .wav, .ogg, .flac convertor
- automatic "radio" based on artist or genre
+- title artist album labels force fit the screen - so the window gets mega expanded with long text. bad
diff --git a/components/PreferencesWindow.py b/components/PreferencesWindow.py
index f035567..c77cb49 100644
--- a/components/PreferencesWindow.py
+++ b/components/PreferencesWindow.py
@@ -10,6 +10,7 @@ from PyQt5.QtWidgets import (
QListWidget,
QWidget,
QDial,
+ QStyle,
)
from logging import debug
from PyQt5.QtGui import QFont
@@ -100,7 +101,13 @@ class PreferencesWindow(QDialog):
self.input_fields[key] = input_field
# Save button
+ pixmapi = QStyle.StandardPixmap.SP_DialogSaveButton
+ style = self.style()
+ if not style:
+ style = QStyle()
+ icon = style.standardIcon(pixmapi)
save_button = QPushButton("Save")
+ save_button.setIcon(icon)
save_button.clicked.connect(self.save_preferences)
self.content_layout.addWidget(save_button)
@@ -125,7 +132,7 @@ class PreferencesWindow(QDialog):
child.widget().deleteLater()
def save_preferences(self):
- """Save preferences, reload the config, then reload the database"""
+ """Save preferences, reload the config, then reload the database if necessary"""
# Upcate the config fields
try:
@@ -140,6 +147,7 @@ class PreferencesWindow(QDialog):
self.config.write(configfile)
self.reloadConfigSignal.emit()
+ # only reload db if we changed the db
if self.current_category_str == "db":
self.reloadDatabaseSignal.emit()
except Exception as e:
diff --git a/main.py b/main.py
index 774484c..dd411b9 100644
--- a/main.py
+++ b/main.py
@@ -24,6 +24,7 @@ from PyQt5.QtWidgets import (
QGraphicsPixmapItem,
QMessageBox,
QStatusBar,
+ QStyle,
)
from PyQt5.QtCore import (
QSize,
@@ -178,6 +179,22 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow):
)
self.timer = QTimer(self) # for playback slider and such
+ # Button styles
+ if not self.style():
+ style = QStyle()
+ else:
+ style = self.style()
+ assert style is not None # i hate linting errors
+ pixmapi = QStyle.StandardPixmap.SP_MediaSkipForward
+ icon = style.standardIcon(pixmapi)
+ self.nextButton.setIcon(icon)
+ pixmapi = QStyle.StandardPixmap.SP_MediaSkipBackward
+ icon = style.standardIcon(pixmapi)
+ self.previousButton.setIcon(icon)
+ pixmapi = QStyle.StandardPixmap.SP_MediaPlay
+ icon = style.standardIcon(pixmapi)
+ self.playButton.setIcon(icon)
+
# sharing functions with other classes and that
self.tableView.load_qapp(self)
self.albumGraphicsView.load_qapp(self)
diff --git a/ui.py b/ui.py
index 65e578c..bbc717d 100644
--- a/ui.py
+++ b/ui.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ui.ui'
#
-# Created by: PyQt5 UI code generator 5.15.10
+# Created by: PyQt5 UI code generator 5.15.11
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
@@ -201,7 +201,7 @@ class Ui_MainWindow(object):
self.verticalLayout_3.setStretch(0, 20)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1152, 24))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1152, 21))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
@@ -254,9 +254,6 @@ class Ui_MainWindow(object):
self.slashLabel.setText(_translate("MainWindow", "/"))
self.endTimeLabel.setText(_translate("MainWindow", "00:00"))
self.speedLabel.setText(_translate("MainWindow", "1.00"))
- self.previousButton.setText(_translate("MainWindow", "⏮️"))
- self.playButton.setText(_translate("MainWindow", "▶️"))
- self.nextButton.setText(_translate("MainWindow", "⏭️"))
self.volumeLabel.setText(_translate("MainWindow", "50"))
self.pushButton.setText(_translate("MainWindow", "nothing"))
self.menuFile.setTitle(_translate("MainWindow", "File"))
diff --git a/ui.ui b/ui.ui
index 97473a7..07cc826 100644
--- a/ui.ui
+++ b/ui.ui
@@ -228,9 +228,6 @@
28
-
- ⏮️
-
-
@@ -240,9 +237,6 @@
28
-
- ▶️
-
-
@@ -252,9 +246,6 @@
28
-
- ⏭️
-
-
@@ -365,7 +356,7 @@
0
0
1152
- 24
+ 21