fix: remove --no-sandbox, dynamic screen resolution detection
This commit is contained in:
+7
-3
@@ -19,8 +19,9 @@ BOOKMARKS_FILE = "/home/jgitta/kiosk-browser/bookmarks.json"
|
||||
CDP_PORT = 9222
|
||||
TOOLBAR_H = 72 # single row — was 142 (82 + 60)
|
||||
TOP_H = TOOLBAR_H
|
||||
SCREEN_W = 1920
|
||||
SCREEN_H = 1080
|
||||
# Screen size is detected dynamically in main() after QApplication starts
|
||||
SCREEN_W = 1920 # overwritten at runtime
|
||||
SCREEN_H = 1080 # overwritten at runtime
|
||||
|
||||
# ── Colour palette ────────────────────────────────────────────────
|
||||
TOOLBAR_COLOR = "#1a3a5c"
|
||||
@@ -622,7 +623,6 @@ def launch_chrome():
|
||||
"--disable-background-networking",
|
||||
"--disable-extensions",
|
||||
"--disable-gpu",
|
||||
"--no-sandbox",
|
||||
"--disable-blink-features=AutomationControlled",
|
||||
"--disable-dev-shm-usage",
|
||||
"--user-data-dir=/home/jgitta/chromium-kiosk",
|
||||
@@ -638,6 +638,10 @@ def launch_chrome():
|
||||
# ── Main ──────────────────────────────────────────────────────────
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
# Detect actual screen resolution at runtime
|
||||
global SCREEN_W, SCREEN_H
|
||||
_geo = app.primaryScreen().geometry()
|
||||
SCREEN_W, SCREEN_H = _geo.width(), _geo.height()
|
||||
app.setApplicationName("SeniorNet")
|
||||
p = app.palette(); p.setColor(QPalette.Window, QColor("#1a3a5c")); app.setPalette(p)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user