Skip to content

Commit 8976ff4

Browse files
committed
- Changed taskbar/window icon from python default to main.svg.
1 parent a8998b8 commit 8976ff4

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

gui/GUI_main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import ctypes
34
import traceback
45
import logging
56

@@ -14,6 +15,9 @@
1415
from gui.run_experiment_tab import Run_experiment_tab
1516
from gui.setups_tab import Setups_tab
1617

18+
if os.name == 'nt': # Needed on windows to get taskbar icon to display correctly.
19+
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(u'pyControl')
20+
1721
# --------------------------------------------------------------------------------
1822
# GUI_main
1923
# --------------------------------------------------------------------------------
@@ -191,6 +195,7 @@ def launch_GUI():
191195
'''Launch the pyControl GUI.'''
192196
app = QtGui.QApplication(sys.argv)
193197
app.setStyle('Fusion')
198+
app.setWindowIcon(QtGui.QIcon("gui/icons/main.svg"))
194199
font = QtGui.QFont()
195200
font.setPixelSize(ui_font_size)
196201
app.setFont(font)

gui/icons/main.svg

Lines changed: 40 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)