From 4e7e8470550451470ba445572b612e391c159aab Mon Sep 17 00:00:00 2001 From: Lily Hopkins Date: Tue, 30 Apr 2024 16:38:49 +0100 Subject: [PATCH] fix: fixed missing syntax highlighting on windows resolves #193 --- .github/workflows/rust-build.yml | 5 +++++ testangel/src/ui/actions/mod.rs | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index 5374526..14aa853 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -247,8 +247,13 @@ jobs: # Language Spec mkdir -p build/language-specs + copy C:\gtk-build\build\x64\release\gtksourceview5\data\language-specs\def.lang build/language-specs + copy C:\gtk-build\build\x64\release\gtksourceview5\data\language-specs\language2.rng build/language-specs copy C:\gtk-build\build\x64\release\gtksourceview5\data\language-specs\lua.lang build/language-specs + mkdir -p build/styles + copy C:\gtk-build\build\x64\release\gtksourceview5\data\styles\* build/styles + - name: Save Cargo cache uses: actions/cache/save@v3 with: diff --git a/testangel/src/ui/actions/mod.rs b/testangel/src/ui/actions/mod.rs index c63b0a9..b3bebd1 100644 --- a/testangel/src/ui/actions/mod.rs +++ b/testangel/src/ui/actions/mod.rs @@ -5,6 +5,7 @@ use relm4::{ adw, gtk, Component, ComponentController, ComponentParts, ComponentSender, Controller, RelmWidgetExt, }; +use sourceview::StyleSchemeManager; use testangel::{ action_loader::ActionMap, ipc::EngineList, @@ -377,6 +378,9 @@ impl Component for ActionsModel { }), ); + // Setup source view style manager + StyleSchemeManager::default().append_search_path("styles"); + let model = ActionsModel { action_map: init.0, engine_list: init.1,