From 876140252ba8d30531cddcd61078a87a346328e0 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Thu, 25 Jul 2024 20:04:52 -0600 Subject: [PATCH] Mods --- cromulant/args.py | 4 ++++ cromulant/argspec.py | 12 ++++++++++++ cromulant/manifest.json | 2 +- cromulant/window.py | 9 +++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/cromulant/args.py b/cromulant/args.py index 8097c59..cb825e2 100644 --- a/cromulant/args.py +++ b/cromulant/args.py @@ -11,6 +11,8 @@ from .argspec import ArgSpec class Args: names: Path | None = None images: bool = True + header: bool = True + footer: bool = True @staticmethod def prepare() -> None: @@ -22,6 +24,8 @@ class Args: other_name = [ ("no_images", "images"), + ("no_header", "header"), + ("no_footer", "footer"), ] for r_item in other_name: diff --git a/cromulant/argspec.py b/cromulant/argspec.py index 12e9803..99be09b 100644 --- a/cromulant/argspec.py +++ b/cromulant/argspec.py @@ -81,3 +81,15 @@ class ArgSpec: action="store_false", info="Don't show the images on the left", ) + + ArgSpec.add_argument( + "no_header", + action="store_false", + info="Don't show the header controls", + ) + + ArgSpec.add_argument( + "no_footer", + action="store_false", + info="Don't show the footer controls", + ) diff --git a/cromulant/manifest.json b/cromulant/manifest.json index 3da2c95..98ec037 100644 --- a/cromulant/manifest.json +++ b/cromulant/manifest.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.1.0", "title": "Cromulant", "program": "cromulant", "author": "madprops", diff --git a/cromulant/window.py b/cromulant/window.py index cf1e22e..748d348 100644 --- a/cromulant/window.py +++ b/cromulant/window.py @@ -30,6 +30,7 @@ from PySide6.QtMultimedia import QMediaPlayer # type: ignore from PySide6.QtMultimedia import QAudioOutput from .config import Config +from .args import Args from .utils import Utils @@ -284,6 +285,10 @@ class Window: container.addWidget(Window.filter, 1) root.setLayout(container) + + if not Args.header: + root.setVisible(False) + Window.root.addWidget(root) @staticmethod @@ -375,6 +380,10 @@ class Window: Window.info.setMinimumSize(35, 35) container.addWidget(Window.info) root.setLayout(container) + + if not Args.footer: + root.setVisible(False) + Window.root.addWidget(root) @staticmethod