kopia lustrzana https://github.com/NanoVNA-Saver/nanovna-saver
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._MEIPASSpull/34/head
rodzic
7c8afe2d71
commit
f0405aea2e
|
@ -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()
|
||||
|
|
Ładowanie…
Reference in New Issue