Add icons to GuiConfiguration
This commit is contained in:
parent
537071ec56
commit
f971b8bd10
@ -1,6 +1,6 @@
|
|||||||
from PySide import QtCore, QtGui
|
from PySide import QtCore, QtGui
|
||||||
from PySide.QtCore import QSettings, Qt
|
from PySide.QtCore import QSettings, Qt
|
||||||
from PySide.QtGui import QApplication, QLineEdit, QCursor, QLabel, QCheckBox, QDesktopServices
|
from PySide.QtGui import QApplication, QLineEdit, QCursor, QLabel, QCheckBox, QDesktopServices, QIcon
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -142,12 +142,19 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
|
|
||||||
def __init__(self, config, playerpaths):
|
def __init__(self, config, playerpaths):
|
||||||
|
|
||||||
|
from syncplay import utils
|
||||||
self.config = config
|
self.config = config
|
||||||
self.QtGui = QtGui
|
self.QtGui = QtGui
|
||||||
|
if sys.platform.startswith('linux'):
|
||||||
|
resourcespath = utils.findWorkingDir() + "/resources/"
|
||||||
|
else:
|
||||||
|
resourcespath = utils.findWorkingDir() + "\\resources\\"
|
||||||
|
print resourcespath
|
||||||
|
|
||||||
super(ConfigDialog, self).__init__()
|
super(ConfigDialog, self).__init__()
|
||||||
|
|
||||||
self.setWindowTitle(getMessage("en", "config-window-title"))
|
self.setWindowTitle(getMessage("en", "config-window-title"))
|
||||||
|
self.setWindowIcon(QtGui.QIcon(resourcespath + "syncplay.png"))
|
||||||
|
|
||||||
if(config['host'] == None):
|
if(config['host'] == None):
|
||||||
host = ""
|
host = ""
|
||||||
@ -183,7 +190,7 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.executablepathCombobox.setMinimumWidth(200)
|
self.executablepathCombobox.setMinimumWidth(200)
|
||||||
self.executablepathCombobox.setMaximumWidth(200)
|
self.executablepathCombobox.setMaximumWidth(200)
|
||||||
self.executablepathLabel = QLabel("Path to player executable:", self)
|
self.executablepathLabel = QLabel("Path to player executable:", self)
|
||||||
self.executablebrowseButton = QtGui.QPushButton("Browse")
|
self.executablebrowseButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'folder_explore.png'),"Browse")
|
||||||
self.executablebrowseButton.clicked.connect(self.browsePlayerpath)
|
self.executablebrowseButton.clicked.connect(self.browsePlayerpath)
|
||||||
self.slowdownCheckbox = QCheckBox("Slow down on desync")
|
self.slowdownCheckbox = QCheckBox("Slow down on desync")
|
||||||
self.mediaplayerSettingsLayout = QtGui.QGridLayout()
|
self.mediaplayerSettingsLayout = QtGui.QGridLayout()
|
||||||
@ -238,10 +245,10 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.mainLayout.addWidget(self.malSettingsGroup)
|
self.mainLayout.addWidget(self.malSettingsGroup)
|
||||||
|
|
||||||
self.topLayout = QtGui.QHBoxLayout()
|
self.topLayout = QtGui.QHBoxLayout()
|
||||||
self.helpButton = QtGui.QPushButton("Help")
|
self.helpButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'help.png'),"Help")
|
||||||
self.helpButton.setMaximumSize(self.helpButton.sizeHint())
|
self.helpButton.setMaximumSize(self.helpButton.sizeHint())
|
||||||
self.helpButton.pressed.connect(self.openHelp)
|
self.helpButton.pressed.connect(self.openHelp)
|
||||||
self.runButton = QtGui.QPushButton("Store configuration and run Syncplay")
|
self.runButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'accept.png'),"Store configuration and run Syncplay")
|
||||||
self.runButton.pressed.connect(self._saveDataAndLeave)
|
self.runButton.pressed.connect(self._saveDataAndLeave)
|
||||||
self.runButtonTextUpdate
|
self.runButtonTextUpdate
|
||||||
self.topLayout.addWidget(self.helpButton, Qt.AlignLeft)
|
self.topLayout.addWidget(self.helpButton, Qt.AlignLeft)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user