Skip to content

Commit

Permalink
BF: Load icon using path in 'prefs'
Browse files Browse the repository at this point in the history
  • Loading branch information
mdc committed Mar 26, 2018
1 parent 5be85f5 commit bbf5152
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions psychopy/visual/backends/glfwbackend.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
""" """


from __future__ import absolute_import, print_function from __future__ import absolute_import, print_function
import sys import sys, os
import numpy as np import numpy as np
from psychopy import logging, event from psychopy import logging, event, prefs
from psychopy.tools.attributetools import attributeSetter from psychopy.tools.attributetools import attributeSetter
from .gamma import createLinearRamp from .gamma import createLinearRamp
from .. import globalVars from .. import globalVars
Expand Down Expand Up @@ -45,7 +45,8 @@
'hresize': glfw.create_standard_cursor(glfw.HRESIZE_CURSOR), 'hresize': glfw.create_standard_cursor(glfw.HRESIZE_CURSOR),
'vresize': glfw.create_standard_cursor(glfw.VRESIZE_CURSOR)} 'vresize': glfw.create_standard_cursor(glfw.VRESIZE_CURSOR)}
# load window icon # load window icon
# _WINDOW_ICON_ = Image.open('psychopy/monitors/psychopy.ico') _WINDOW_ICON_ = Image.open(
os.path.join(prefs.paths['resources'], 'psychopy.png'))




class GLFWBackend(BaseBackend): class GLFWBackend(BaseBackend):
Expand Down Expand Up @@ -286,7 +287,7 @@ def __init__(self, win, *args, **kwargs):
share=share_context) share=share_context)


# set the window icon # set the window icon
#glfw.set_window_icon(self.winHandle, 1, _WINDOW_ICON_) glfw.set_window_icon(self.winHandle, 1, _WINDOW_ICON_)


# The window's user pointer maps the Python Window object to its GLFW # The window's user pointer maps the Python Window object to its GLFW
# representation. # representation.
Expand Down

0 comments on commit bbf5152

Please sign in to comment.