color-management-v1: only expose the protocol with vulkan
This commit is contained in:
parent
248eb324a5
commit
fcd2e3ab33
7 changed files with 40 additions and 2 deletions
10
src/state.rs
10
src/state.rs
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue