diff --git a/entrypoint/src/main.rs b/entrypoint/src/main.rs index 6db020667..c2624ca6e 100644 --- a/entrypoint/src/main.rs +++ b/entrypoint/src/main.rs @@ -37,6 +37,14 @@ fn handle_splash() { } } +fn handle_debug() { + if std::env::var("SWIFTNAV_CONSOLE_DEBUG").is_ok() { + for (key, value) in std::env::vars() { + eprintln!("{key}={value}"); + } + } +} + fn app_dir() -> Result { let current_exe = std::env::current_exe()?; current_exe @@ -66,6 +74,7 @@ fn pythonhome_dir() -> Result { fn main() -> Result<()> { attach_console(); handle_wayland(); + handle_debug(); let args: Vec<_> = std::env::args().collect(); std::env::set_var("SWIFTNAV_CONSOLE_FROZEN", app_dir()?); std::env::set_var("PYTHONHOME", pythonhome_dir()?); diff --git a/swiftnav_console/main.py b/swiftnav_console/main.py index 6eea8b6b9..e8a443dc3 100644 --- a/swiftnav_console/main.py +++ b/swiftnav_console/main.py @@ -23,6 +23,8 @@ from PySide2.QtQml import QQmlComponent, qmlRegisterType +from PySide2.QtQuickControls2 import QQuickStyle + import swiftnav_console.console_resources # type: ignore # pylint: disable=unused-import from .constants import ApplicationMetadata, ConnectionState, ConnectionType, Keys, Tabs @@ -724,6 +726,8 @@ def main(passed_args: Optional[Tuple[str, ...]] = None) -> int: QFontDatabase.addApplicationFont(":/fonts/Roboto-Regular.ttf") QFontDatabase.addApplicationFont(":/fonts/Roboto-Bold.ttf") QFontDatabase.addApplicationFont(":/fonts/RobotoCondensed-Regular.ttf") + QQuickStyle.setStyle("SwiftNav") + QQuickStyle.setFallbackStyle("Material") # We specifically *don't* want the RobotoCondensed-Bold.ttf font so we get the right look when bolded. qmlRegisterType(LogPanelData, "SwiftConsole", 1, 0, "LogPanelData") # type: ignore