Made the interface more compact for smaller screens, especially on Mac.

This commit is contained in:
Joey Payne 2014-10-08 19:18:22 +13:00
commit f620753d40
2 changed files with 32 additions and 3 deletions

View file

@ -18,4 +18,21 @@ install_name_tool -change /usr/local/lib/libshiboken-python2.7.1.2.1.dylib @exec
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/PySide.QtNetwork.so
install_name_tool -change /usr/local/lib/QtNetwork.framework/Versions/4/QtNetwork @executable_path/QtNetwork Web2Executable.app/Contents/MacOS/PySide.QtNetwork.so
install_name_tool -change /usr/local/lib/libpyside-python2.7.1.2.1.dylib @executable_path/libpyside-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.dylib
install_name_tool -change /usr/local/lib/libshiboken-python2.7.1.2.1.dylib @executable_path/libshiboken-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.dylib
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.dylib
install_name_tool -change /usr/local/lib/libpyside-python2.7.1.2.1.dylib @executable_path/libpyside-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.1.dylib
install_name_tool -change /usr/local/lib/libshiboken-python2.7.1.2.1.dylib @executable_path/libshiboken-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.1.dylib
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.1.dylib
install_name_tool -change /usr/local/lib/QtGui.framework/Versions/4/QtGui @executable_path/QtGui Web2Executable.app/Contents/MacOS/QtGui
install_name_tool -change /usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/QtGui
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/QtCore
install_name_tool -change /usr/local/lib/QtNetwork.framework/Versions/4/QtNetwork @executable_path/QtNetwork Web2Executable.app/Contents/MacOS/QtNetwork
install_name_tool -change /usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/QtNetwork

18
main.py
View file

@ -285,6 +285,7 @@ class MainWindow(QtGui.QWidget):
def create_application_layout(self):
self.main_layout = QtGui.QVBoxLayout()
self.main_layout.setContentsMargins(10,5,10,5)
self.create_layout_widgets()
@ -427,10 +428,15 @@ class MainWindow(QtGui.QWidget):
hlayout = QtGui.QHBoxLayout()
vlayout = QtGui.QVBoxLayout()
vlayout.setContentsMargins(5,5,5,5)
vlayout.setSpacing(5)
hlayout.setSpacing(5)
hlayout.setContentsMargins(5,5,5,5)
progress_label = QtGui.QLabel('')
progress_bar = QtGui.QProgressBar()
progress_bar.setVisible(False)
progress_bar.setContentsMargins(5,5,5,5)
vlayout.addWidget(progress_label)
vlayout.addWidget(progress_bar)
@ -447,6 +453,7 @@ class MainWindow(QtGui.QWidget):
open_export_button.setIcon(QtGui.QIcon(os.path.join('files','images','folder_open.png')))
open_export_button.setToolTip('Open Export Folder')
open_export_button.setMaximumWidth(30)
open_export_button.setMaximumHeight(30)
ex_button.clicked.connect(self.callWithObject('export', ex_button, cancel_button))
cancel_button.clicked.connect(self.cancelDownload)
@ -712,6 +719,10 @@ class MainWindow(QtGui.QWidget):
output_layout.addWidget(output_button)
vlayout = QtGui.QVBoxLayout()
vlayout.setSpacing(5);
vlayout.setContentsMargins(10,5,10,5);
vlayout.addLayout(input_layout)
vlayout.addLayout(output_layout)
@ -822,7 +833,7 @@ class MainWindow(QtGui.QWidget):
def createExportSettings(self):
groupBox = QtGui.QGroupBox("Export to")
vlayout = self.createLayout(self.export_setting_order)
vlayout = self.createLayout(self.export_setting_order, cols=4)
groupBox.setLayout(vlayout)
return groupBox
@ -830,14 +841,15 @@ class MainWindow(QtGui.QWidget):
def createDownloadSettings(self):
groupBox = QtGui.QGroupBox("Download Settings")
vlayout = self.createLayout(self.download_setting_order)
vlayout = self.createLayout(self.download_setting_order, 2)
groupBox.setLayout(vlayout)
return groupBox
def createLayout(self, settings, cols=3):
glayout = QtGui.QGridLayout()
glayout.setContentsMargins(10,5,10,5)
glayout.setSpacing(10)
col = 0
row = 0