theme: build out the theme engine core with resolve pipeline

This commit is contained in:
2026-10-28 10:54:02 +07:00
parent b4d3359d4f
commit 12d4120bfd
14 changed files with 1434 additions and 37 deletions
+20
View File
@@ -0,0 +1,20 @@
//! The adapter for unknown systems:
//! no colors of its own, resolution degrades to the neutral presets.
use super::ThemeSource;
use crate::ThemeVariant;
use crate::system::SystemTheme;
// Constructed only by `platform_source` on non-macOS targets.
#[cfg_attr(target_os = "macos", allow(dead_code))]
pub(crate) struct FallbackSource;
impl ThemeSource for FallbackSource {
fn snapshot(&self, variant: ThemeVariant) -> SystemTheme {
SystemTheme::fallback(variant)
}
fn label(&self) -> &'static str {
crate::system::SourceKind::Fallback.label()
}
}