Rename application to Samsara and add assessment summary, detailed tabs and local Linux inventory
This commit is contained in:
22
samsara/ui/branding.py
Normal file
22
samsara/ui/branding.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Application identity and bundled logo shared by the desktop entry points."""
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
APP_ID = 'com.doorstodurin.Samsara'
|
||||
LOGO_PATH = Path(__file__).resolve().parents[1] / 'assets' / 'samsara-logo.jpg'
|
||||
|
||||
|
||||
def configure_taskbar_identity():
|
||||
"""Set the Windows process identity before creating any Qt windows."""
|
||||
if sys.platform == 'win32':
|
||||
import ctypes
|
||||
try:
|
||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(APP_ID)
|
||||
except (AttributeError, OSError):
|
||||
# A shell integration failure must not prevent assessments.
|
||||
pass
|
||||
|
||||
|
||||
def application_icon():
|
||||
from PySide6.QtGui import QIcon
|
||||
return QIcon(str(LOGO_PATH))
|
||||
Reference in New Issue
Block a user