Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
BF: Load icon using path in 'prefs'
- Loading branch information
Showing
with
5 additions
and
4 deletions.
-
+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. |
|
|