Skip to content

Commit

Permalink
Enable vista styles on windows version
Browse files Browse the repository at this point in the history
Had to push a DLL into the package because otherwise the app looked super flat
  • Loading branch information
jsoma committed Feb 19, 2018
1 parent 4da401b commit 0268eb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from PyQt5.QtWidgets import (QMainWindow, QTextEdit,
QAction, QFileDialog, QApplication, QWidget, QLabel,
QComboBox, QApplication, QHBoxLayout, QVBoxLayout, QPushButton,
QTableWidget,QTableWidgetItem, QGridLayout)
QTableWidget,QTableWidgetItem, QGridLayout, QStyleFactory)
import PyQt5.QtGui
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import Qt
Expand Down Expand Up @@ -238,8 +238,8 @@ def onActivated(self, text):


if __name__ == '__main__':

app = QApplication(sys.argv)
# app.setStyle(QStyleFactory.create('macintosh'))
if 'windowsvista' in QStyleFactory.keys():
app.setStyle(QStyleFactory.create('windowsvista'))
ex = VisualCensusGeocoder()
sys.exit(app.exec_())
4 changes: 3 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ pyinstaller --log-level=DEBUG ^
--name "Simple Visual Geocoder" ^
--windowed ^
--noconfirm ^
--add-binary env/Lib/site-packages/PyQt5\Qt\plugins\platforms\qwindows.dll;platforms ^
--add-binary env/Lib/site-packages/PyQt5/Qt/plugins/platforms/qwindows.dll;platforms ^
--add-binary env/Lib/site-packages/PyQt5/Qt/plugins/styles/qwindowsvistastyle.dll;PyQt5/Qt/plugins/styles ^
--add-data app/worldwide.png;. ^
--onefile ^
--exclude-module scipy ^
--exclude-module matplotlib ^
--icon icon/worldwide.ico ^
--hidden-import="pandas._libs.tslibs.timedeltas" ^
app/app.py

python -c "import shutil;shutil.make_archive('release/SimpleVisualGeocoder.Win', 'zip', 'dist', 'Simple Visual Geocoder.exe')"
Binary file modified release/SimpleVisualGeocoder.Win.zip
Binary file not shown.

0 comments on commit 0268eb6

Please sign in to comment.