added cli switch to turn off theming

This commit is contained in:
2023-01-25 12:31:10 +01:00
parent d25ef17c5b
commit 5f7422aafe

View File

@ -10,9 +10,12 @@ from .mdi import MDIWindowMode
def main(): def main():
app = QApplication(sys.argv) app = QApplication(sys.argv)
theme.apply(app)
ctrl_c.setup(app) ctrl_c.setup(app)
clargs = handle_clargs() clargs = handle_clargs()
if not clargs.pop("no_theme"):
theme.apply(app)
mw = MainWindow(**clargs) mw = MainWindow(**clargs)
mw.show() mw.show()
sys.exit(app.exec()) sys.exit(app.exec())
@ -25,10 +28,11 @@ def handle_clargs():
parser.add_argument("-H", "--host", default="localhost", help="Server host name") parser.add_argument("-H", "--host", default="localhost", help="Server host name")
parser.add_argument("-P", "--port", default=8000, type=int, help="Server port number") parser.add_argument("-P", "--port", default=8000, type=int, help="Server port number")
parser.add_argument("-e", "--examples", dest="add_examples", action="store_true", help="Add example data")
parser.add_argument("-w", "--window-mode", default="multi", choices=MDIWindowMode.values(), type=unambiguous_window_mode, help="Set the initial window mode") parser.add_argument("-w", "--window-mode", default="multi", choices=MDIWindowMode.values(), type=unambiguous_window_mode, help="Set the initial window mode")
parser.add_argument("-e", "--examples", dest="add_examples", action="store_true", help="Add example data")
parser.add_argument("--no-theme", action="store_true", help="Disable theming")
return parser.parse_args().__dict__ return parser.parse_args().__dict__