Permalink
Browse files

BF: Load icon using path in 'prefs'

  • Loading branch information...
mdcutone committed Mar 26, 2018
1 parent 5be85f5 commit bbf5152166429e1fdd6bc80785b9d4c364c27b89
Showing with 5 additions and 4 deletions.
  1. +5 −4 psychopy/visual/backends/glfwbackend.py
@@ -14,9 +14,9 @@
"""
from __future__ import absolute_import, print_function
import sys
import sys, os
import numpy as np
from psychopy import logging, event
from psychopy import logging, event, prefs
from psychopy.tools.attributetools import attributeSetter
from .gamma import createLinearRamp
from .. import globalVars
@@ -45,7 +45,8 @@
'hresize': glfw.create_standard_cursor(glfw.HRESIZE_CURSOR),
'vresize': glfw.create_standard_cursor(glfw.VRESIZE_CURSOR)}
# 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):
@@ -286,7 +287,7 @@ def __init__(self, win, *args, **kwargs):
share=share_context)
# 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
# representation.

0 comments on commit bbf5152

Please sign in to comment.