1
0
Fork 0
forked from wry/wry

color-management-v1: only expose the protocol with vulkan

This commit is contained in:
Julian Orth 2025-02-26 16:24:22 +01:00
parent 248eb324a5
commit fcd2e3ab33
7 changed files with 40 additions and 2 deletions

View file

@ -1315,6 +1315,16 @@ impl State {
pub fn tray_icon_size(&self) -> i32 {
(self.theme.sizes.title_height.get() - 2).max(0)
}
pub fn color_management_available(&self) -> bool {
if !self.color_management_enabled.get() {
return false;
}
let Some(ctx) = self.render_ctx.get() else {
return false;
};
ctx.supports_color_management()
}
}
#[derive(Debug, Error)]