From 7cd9f933953daff9025122e0124716b79acf0bdf Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Tue, 10 Feb 2026 00:09:18 +0000 Subject: [PATCH] Add apply_exports_static for convenience --- cosmic-theme/src/output/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cosmic-theme/src/output/mod.rs b/cosmic-theme/src/output/mod.rs index 2f7cfa7d..4cc76eaf 100644 --- a/cosmic-theme/src/output/mod.rs +++ b/cosmic-theme/src/output/mod.rs @@ -35,6 +35,17 @@ impl Theme { Ok(()) } + #[inline] + /// To avoid rewriting too much code, I replaced calls to `Theme::apply_gtk` with this. + /// Note that vscode isn't touched by this function. + pub fn apply_exports_static(is_dark: bool) -> Result<(), OutputError> { + let gtk_res = Theme::apply_gtk(is_dark); + let qt_res = Theme::apply_qt(is_dark); + gtk_res?; + qt_res?; + Ok(()) + } + #[inline] pub fn write_exports(&self) -> Result<(), OutputError> { let gtk_res = self.write_gtk4();