Add apply_exports_static for convenience

This commit is contained in:
Adil Hanney 2026-02-10 00:09:18 +00:00
parent 3712406972
commit 7cd9f93395
No known key found for this signature in database

View file

@ -35,6 +35,17 @@ impl Theme {
Ok(()) 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] #[inline]
pub fn write_exports(&self) -> Result<(), OutputError> { pub fn write_exports(&self) -> Result<(), OutputError> {
let gtk_res = self.write_gtk4(); let gtk_res = self.write_gtk4();