Skip to content

Commit

Permalink
problem with wayland and icon for the QApp
Browse files Browse the repository at this point in the history
  • Loading branch information
otvam committed Jan 10, 2025
1 parent 6e58801 commit 65919fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/content/warnings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ Library Issues

.. important::
The **plotting code** is probably sensitive to the environment (platform and version of the libraries).
Therefore, these dependencies are minimized and insulated from the rest of the code.
Particularly, using the Wayland display system (instead of X11) is creating several issues.
The plotting code (viewer and plotter) is separated from the simulation code (mesher and solver).
Hence, these graphical dependencies are minimized and insulated from the rest of the code.

.. important::
**Jupyter** is not included in the default package dependencies.
Expand Down
5 changes: 5 additions & 0 deletions pypeec/lib_plot/manage_plotgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def __init__(self, plot_mode, folder, name):
# create and assign a single instance
APPQT = qtpy.QtWidgets.QApplication([])

# set the icon
filename = importlib.resources.files("pypeec.data").joinpath("pypeec.png")
res_icon = qtpy.QtGui.QIcon(str(filename))
APPQT.setWindowIcon(res_icon)

# set the app ID in order to get a consistent icon on MS Windows
if (self.plot_mode == "qt") and (os.name == "nt"):
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("pypeec")
Expand Down

0 comments on commit 65919fc

Please sign in to comment.