1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Allow customisation using an env var.

This commit is contained in:
Shlomi Fish 2019-04-28 23:33:35 +03:00
parent 2aaf094f96
commit 2282db5af7

View file

@ -5,6 +5,9 @@
# https://stackoverflow.com/questions/22583035
# Thanks!
import os
import os.path
try:
from PySide2.QtGui import QPixmap # noqa: F401
from PySolFC_KCard import MyKCardDeck
@ -25,7 +28,8 @@ class SVGManager:
def __init__(self, filename):
self.filename = filename
# self.svg = Rsvg.Handle().new_from_file(filename)
self.d = MyKCardDeck("svg-jolly-royal")
self.d = MyKCardDeck(
os.path.basename(os.getenv("PYSOL_SVG_THEME", "svg-jolly-royal")))
# Taken from https://stackoverflow.com/questions/44471795
# Under MIT License - thanks.