For debug putted back os path.

So if you set debug to True in the about file, it will get the file url 
from os path. When debug is set to false, it will get it from 
sys._MEIPASS
pull/34/head
Carl Tremblay 2019-10-09 20:18:49 -04:00
rodzic 7c8afe2d71
commit f0405aea2e
1 zmienionych plików z 30 dodań i 4 usunięć

Wyświetl plik

@ -13,9 +13,35 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from os.path import join, dirname, abspath
import sys
from .about import debug
DARK_SKIN_MONOCHROME = sys._MEIPASS + '/skins/dark-monochrome.css')
DARK_SKIN_COLORED = sys._MEIPASS + '/skins/dark-colored.css')
LIGHT_SKIN_MONOCHROME = sys._MEIPASS + '/skins/light-monochrome.css')
LIGHT_SKIN_COLORED = sys._MEIPASS + '/skins/light-colored.css')
def DARK_SKIN_MONOCHROME():
if debug == True:
return join(dirname(abspath(__file__)), 'skins/dark-monochrome.css')
else:
return sys._MEIPASS + '/skins/dark-monochrome.css'
def DARK_SKIN_COLORED():
if debug == True:
return join(dirname(abspath(__file__)), 'skins/dark-colored.css')
else:
return sys._MEIPASS + '/skins/dark-colored.css'
def LIGHT_SKIN_MONOCHROME():
if debug == True:
return join(dirname(abspath(__file__)), 'skins/light-monochrome.css')
else:
return sys._MEIPASS + '/skins/light-monochrome.css'
def LIGHT_SKIN_COLORED():
if debug == True:
return join(dirname(abspath(__file__)), 'skins/light-colored.css')
else:
return sys._MEIPASS + '/skins/light-colored.css'
DARK_SKIN_MONOCHROME = DARK_SKIN_MONOCHROME()
DARK_SKIN_COLORED = DARK_SKIN_COLORED()
LIGHT_SKIN_MONOCHROME = LIGHT_SKIN_MONOCHROME()
LIGHT_SKIN_COLORED = LIGHT_SKIN_COLORED()