Switch icons to Material via QtAwesome
This commit is contained in:
parent
10ac48b6b9
commit
b9666a0f61
16
setup.cfg
Normal file
16
setup.cfg
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[metadata]
|
||||||
|
name = Playtypus
|
||||||
|
version = 0.1.0
|
||||||
|
description = A desktop client for Funkwhale
|
||||||
|
|
||||||
|
[options]
|
||||||
|
packages = find:
|
||||||
|
= src
|
||||||
|
install_requirements =
|
||||||
|
PyQt5
|
||||||
|
requests
|
||||||
|
funksnake
|
||||||
|
QtAwesome
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
max-line-length = 120
|
@ -1,5 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
import qtawesome as qta
|
||||||
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
LIST_WIDGET_STYLES = """
|
LIST_WIDGET_STYLES = """
|
||||||
QListWidget {
|
QListWidget {
|
||||||
@ -32,22 +33,22 @@ class UiMainWindow(object):
|
|||||||
self.playbackLayout.setSpacing(0)
|
self.playbackLayout.setSpacing(0)
|
||||||
self.playbackLayout.setObjectName("playbackLayout")
|
self.playbackLayout.setObjectName("playbackLayout")
|
||||||
self.toggleButton = QtWidgets.QToolButton(self.playbackWidget)
|
self.toggleButton = QtWidgets.QToolButton(self.playbackWidget)
|
||||||
self.toggleButton.setIcon(QtGui.QIcon.fromTheme("expand"))
|
self.toggleButton.setIcon(qta.icon("mdi.chevron-down"))
|
||||||
self.toggleButton.setAutoRaise(True)
|
self.toggleButton.setAutoRaise(True)
|
||||||
self.toggleButton.setObjectName("toggleButton")
|
self.toggleButton.setObjectName("toggleButton")
|
||||||
self.playbackLayout.addWidget(self.toggleButton)
|
self.playbackLayout.addWidget(self.toggleButton)
|
||||||
self.previousButton = QtWidgets.QToolButton(self.playbackWidget)
|
self.previousButton = QtWidgets.QToolButton(self.playbackWidget)
|
||||||
self.previousButton.setIcon(QtGui.QIcon.fromTheme("media-skip-backward"))
|
self.previousButton.setIcon(qta.icon("mdi.skip-previous"))
|
||||||
self.previousButton.setAutoRaise(True)
|
self.previousButton.setAutoRaise(True)
|
||||||
self.previousButton.setObjectName("previousButton")
|
self.previousButton.setObjectName("previousButton")
|
||||||
self.playbackLayout.addWidget(self.previousButton)
|
self.playbackLayout.addWidget(self.previousButton)
|
||||||
self.playButton = QtWidgets.QToolButton(self.playbackWidget)
|
self.playButton = QtWidgets.QToolButton(self.playbackWidget)
|
||||||
self.playButton.setIcon(QtGui.QIcon.fromTheme("media-playback-start"))
|
self.playButton.setIcon(qta.icon("mdi.play"))
|
||||||
self.playButton.setAutoRaise(True)
|
self.playButton.setAutoRaise(True)
|
||||||
self.playButton.setObjectName("playButton")
|
self.playButton.setObjectName("playButton")
|
||||||
self.playbackLayout.addWidget(self.playButton)
|
self.playbackLayout.addWidget(self.playButton)
|
||||||
self.nextButton = QtWidgets.QToolButton(self.playbackWidget)
|
self.nextButton = QtWidgets.QToolButton(self.playbackWidget)
|
||||||
self.nextButton.setIcon(QtGui.QIcon.fromTheme("media-skip-forward"))
|
self.nextButton.setIcon(qta.icon("mdi.skip-next"))
|
||||||
self.nextButton.setAutoRaise(True)
|
self.nextButton.setAutoRaise(True)
|
||||||
self.nextButton.setObjectName("nextButton")
|
self.nextButton.setObjectName("nextButton")
|
||||||
self.playbackLayout.addWidget(self.nextButton)
|
self.playbackLayout.addWidget(self.nextButton)
|
||||||
@ -60,17 +61,17 @@ class UiMainWindow(object):
|
|||||||
self.positionSlider.setObjectName("positionSlider")
|
self.positionSlider.setObjectName("positionSlider")
|
||||||
self.playbackLayout.addWidget(self.positionSlider)
|
self.playbackLayout.addWidget(self.positionSlider)
|
||||||
self.shuffleButton = QtWidgets.QToolButton(self.playbackWidget)
|
self.shuffleButton = QtWidgets.QToolButton(self.playbackWidget)
|
||||||
self.shuffleButton.setIcon(QtGui.QIcon.fromTheme("media-playlist-normal"))
|
self.shuffleButton.setIcon(qta.icon("mdi.shuffle"))
|
||||||
self.shuffleButton.setAutoRaise(True)
|
self.shuffleButton.setAutoRaise(True)
|
||||||
self.shuffleButton.setObjectName("shuffleButton")
|
self.shuffleButton.setObjectName("shuffleButton")
|
||||||
self.playbackLayout.addWidget(self.shuffleButton)
|
self.playbackLayout.addWidget(self.shuffleButton)
|
||||||
self.repeatButton = QtWidgets.QToolButton(self.playbackWidget)
|
self.repeatButton = QtWidgets.QToolButton(self.playbackWidget)
|
||||||
self.repeatButton.setIcon(QtGui.QIcon.fromTheme("media-repeat-none"))
|
self.repeatButton.setIcon(qta.icon("mdi.repeat"))
|
||||||
self.repeatButton.setAutoRaise(True)
|
self.repeatButton.setAutoRaise(True)
|
||||||
self.repeatButton.setObjectName("repeatButton")
|
self.repeatButton.setObjectName("repeatButton")
|
||||||
self.playbackLayout.addWidget(self.repeatButton)
|
self.playbackLayout.addWidget(self.repeatButton)
|
||||||
self.muteButton = QtWidgets.QToolButton(self.playbackWidget)
|
self.muteButton = QtWidgets.QToolButton(self.playbackWidget)
|
||||||
self.muteButton.setIcon(QtGui.QIcon.fromTheme("player-volume"))
|
self.muteButton.setIcon(qta.icon("mdi.volume-high"))
|
||||||
self.muteButton.setCheckable(True)
|
self.muteButton.setCheckable(True)
|
||||||
self.muteButton.setAutoRaise(True)
|
self.muteButton.setAutoRaise(True)
|
||||||
self.muteButton.setObjectName("muteButton")
|
self.muteButton.setObjectName("muteButton")
|
||||||
@ -80,7 +81,7 @@ class UiMainWindow(object):
|
|||||||
self.volumeSlider.setObjectName("volumeSlider")
|
self.volumeSlider.setObjectName("volumeSlider")
|
||||||
self.playbackLayout.addWidget(self.volumeSlider)
|
self.playbackLayout.addWidget(self.volumeSlider)
|
||||||
self.menuButton = QtWidgets.QToolButton(self.playbackWidget)
|
self.menuButton = QtWidgets.QToolButton(self.playbackWidget)
|
||||||
self.menuButton.setIcon(QtGui.QIcon.fromTheme("application-menu"))
|
self.menuButton.setIcon(qta.icon("mdi.menu"))
|
||||||
self.menuButton.setPopupMode(QtWidgets.QToolButton.DelayedPopup)
|
self.menuButton.setPopupMode(QtWidgets.QToolButton.DelayedPopup)
|
||||||
self.menuButton.setAutoRaise(True)
|
self.menuButton.setAutoRaise(True)
|
||||||
self.menuButton.setObjectName("menuButton")
|
self.menuButton.setObjectName("menuButton")
|
||||||
@ -116,7 +117,7 @@ class UiMainWindow(object):
|
|||||||
self.albumPageTitleLayout.setObjectName("albumPageTitleLayout")
|
self.albumPageTitleLayout.setObjectName("albumPageTitleLayout")
|
||||||
self.albumPageIconLabel = QtWidgets.QLabel(self.albumPage)
|
self.albumPageIconLabel = QtWidgets.QLabel(self.albumPage)
|
||||||
self.albumPageIconLabel.setPixmap(
|
self.albumPageIconLabel.setPixmap(
|
||||||
QtGui.QIcon.fromTheme('view-media-album-cover').pixmap(self.albumPageIconLabel.geometry().height()))
|
qta.icon('mdi.album').pixmap(self.albumPageIconLabel.geometry().height()))
|
||||||
self.albumPageTitleLayout.addWidget(self.albumPageIconLabel)
|
self.albumPageTitleLayout.addWidget(self.albumPageIconLabel)
|
||||||
self.albumPageTitleLabel = QtWidgets.QLabel(self.albumPage)
|
self.albumPageTitleLabel = QtWidgets.QLabel(self.albumPage)
|
||||||
self.albumPageTitleLayout.addWidget(self.albumPageTitleLabel)
|
self.albumPageTitleLayout.addWidget(self.albumPageTitleLabel)
|
||||||
@ -124,10 +125,10 @@ class UiMainWindow(object):
|
|||||||
self.albumListWidget = QtWidgets.QListWidget(self.albumPage)
|
self.albumListWidget = QtWidgets.QListWidget(self.albumPage)
|
||||||
self.albumListWidget.setObjectName("albumListWidget")
|
self.albumListWidget.setObjectName("albumListWidget")
|
||||||
self.albumListWidget.setSortingEnabled(True)
|
self.albumListWidget.setSortingEnabled(True)
|
||||||
self.albumListWidget.setViewMode(QtWidgets.QListView.IconMode)
|
# self.albumListWidget.setViewMode(QtWidgets.QListView.IconMode)
|
||||||
self.albumListWidget.setMovement(QtWidgets.QListView.Static)
|
# self.albumListWidget.setMovement(QtWidgets.QListView.Static)
|
||||||
self.albumListWidget.setIconSize(QtCore.QSize(100, 100))
|
self.albumListWidget.setIconSize(QtCore.QSize(100, 100))
|
||||||
self.albumListWidget.setGridSize(QtCore.QSize(128, 128))
|
# self.albumListWidget.setGridSize(QtCore.QSize(128, 128))
|
||||||
self.albumPageLayout.addWidget(self.albumListWidget)
|
self.albumPageLayout.addWidget(self.albumListWidget)
|
||||||
self.stackedWidget.addWidget(self.albumPage)
|
self.stackedWidget.addWidget(self.albumPage)
|
||||||
self.artistPage = QtWidgets.QWidget()
|
self.artistPage = QtWidgets.QWidget()
|
||||||
@ -172,11 +173,11 @@ class UiMainWindow(object):
|
|||||||
self.actionPlay.setObjectName("actionPlay")
|
self.actionPlay.setObjectName("actionPlay")
|
||||||
|
|
||||||
self.mainMenu = QtWidgets.QMenu(self)
|
self.mainMenu = QtWidgets.QMenu(self)
|
||||||
self.settingsAction = self.mainMenu.addAction(QtGui.QIcon.fromTheme('configure'), '')
|
self.settingsAction = self.mainMenu.addAction(qta.icon('mdi.application-settings'), '')
|
||||||
|
|
||||||
self.albumsListItem = QtWidgets.QListWidgetItem(QtGui.QIcon.fromTheme('view-media-album-cover'), '')
|
self.albumsListItem = QtWidgets.QListWidgetItem(qta.icon('mdi.album'), '')
|
||||||
self.artistsListItem = QtWidgets.QListWidgetItem(QtGui.QIcon.fromTheme('view-media-artist'), '')
|
self.artistsListItem = QtWidgets.QListWidgetItem(qta.icon('mdi.account'), '')
|
||||||
self.tracksListItem = QtWidgets.QListWidgetItem(QtGui.QIcon.fromTheme('view-media-track'), '')
|
self.tracksListItem = QtWidgets.QListWidgetItem(qta.icon('mdi.music'), '')
|
||||||
for item in [self.albumsListItem, self.artistsListItem, self.tracksListItem]:
|
for item in [self.albumsListItem, self.artistsListItem, self.tracksListItem]:
|
||||||
self.viewListWidget.addItem(item)
|
self.viewListWidget.addItem(item)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user