Skip to content

Commit 3963fbb

Browse files
Cherry pick e82ae50 b8404a0 (#681)
1 parent 67210a7 commit 3963fbb

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

entrypoint/src/main.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ fn handle_splash() {
3737
}
3838
}
3939

40+
fn handle_debug() {
41+
if std::env::var("SWIFTNAV_CONSOLE_DEBUG").is_ok() {
42+
for (key, value) in std::env::vars() {
43+
eprintln!("{key}={value}");
44+
}
45+
}
46+
}
47+
4048
fn app_dir() -> Result<PathBuf> {
4149
let current_exe = std::env::current_exe()?;
4250
current_exe
@@ -66,6 +74,7 @@ fn pythonhome_dir() -> Result<PathBuf> {
6674
fn main() -> Result<()> {
6775
attach_console();
6876
handle_wayland();
77+
handle_debug();
6978
let args: Vec<_> = std::env::args().collect();
7079
std::env::set_var("SWIFTNAV_CONSOLE_FROZEN", app_dir()?);
7180
std::env::set_var("PYTHONHOME", pythonhome_dir()?);

swiftnav_console/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
from PySide2.QtQml import QQmlComponent, qmlRegisterType
2525

26+
from PySide2.QtQuickControls2 import QQuickStyle
27+
2628
import swiftnav_console.console_resources # type: ignore # pylint: disable=unused-import
2729

2830
from .constants import ApplicationMetadata, ConnectionState, ConnectionType, Keys, Tabs
@@ -724,6 +726,8 @@ def main(passed_args: Optional[Tuple[str, ...]] = None) -> int:
724726
QFontDatabase.addApplicationFont(":/fonts/Roboto-Regular.ttf")
725727
QFontDatabase.addApplicationFont(":/fonts/Roboto-Bold.ttf")
726728
QFontDatabase.addApplicationFont(":/fonts/RobotoCondensed-Regular.ttf")
729+
QQuickStyle.setStyle("SwiftNav")
730+
QQuickStyle.setFallbackStyle("Material")
727731
# We specifically *don't* want the RobotoCondensed-Bold.ttf font so we get the right look when bolded.
728732

729733
qmlRegisterType(LogPanelData, "SwiftConsole", 1, 0, "LogPanelData") # type: ignore

0 commit comments

Comments
 (0)