control-center: add color management pane
This commit is contained in:
parent
ba044793dc
commit
6f103eac88
4 changed files with 54 additions and 3 deletions
|
|
@ -1,6 +1,9 @@
|
|||
use {
|
||||
crate::{
|
||||
control_center::{cc_compositor::CompositorPane, cc_idle::IdlePane},
|
||||
control_center::{
|
||||
cc_color_management::ColorManagementPane, cc_compositor::CompositorPane,
|
||||
cc_idle::IdlePane,
|
||||
},
|
||||
egui_adapter::egui_platform::{
|
||||
EggError, EggWindow, EggWindowOwner,
|
||||
icons::{ICON_CLOSE, ICON_DRAG_INDICATOR, ICON_INFO},
|
||||
|
|
@ -30,6 +33,7 @@ use {
|
|||
thiserror::Error,
|
||||
};
|
||||
|
||||
mod cc_color_management;
|
||||
mod cc_compositor;
|
||||
mod cc_idle;
|
||||
mod cc_sidebar;
|
||||
|
|
@ -67,6 +71,7 @@ bitflags! {
|
|||
ControlCenterInterest: u32;
|
||||
CCI_COMPOSITOR,
|
||||
CCI_IDLE,
|
||||
CCI_COLOR_MANAGEMENT,
|
||||
}
|
||||
|
||||
pub struct ControlCenter {
|
||||
|
|
@ -109,6 +114,7 @@ struct PaneState {
|
|||
enum PaneType {
|
||||
Compositor(CompositorPane),
|
||||
Idle(IdlePane),
|
||||
ColorManagement(ColorManagementPane),
|
||||
}
|
||||
|
||||
struct CcBehavior<'a> {
|
||||
|
|
@ -129,6 +135,7 @@ impl Pane {
|
|||
match &self.ty {
|
||||
PaneType::Compositor(v) => v.title(res),
|
||||
PaneType::Idle(v) => v.title(res),
|
||||
PaneType::ColorManagement(v) => v.title(res),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -136,6 +143,7 @@ impl Pane {
|
|||
match &mut self.ty {
|
||||
PaneType::Compositor(p) => p.show(ui),
|
||||
PaneType::Idle(p) => p.show(ui),
|
||||
PaneType::ColorManagement(p) => p.show(ui),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -145,6 +153,7 @@ impl PaneType {
|
|||
match self {
|
||||
PaneType::Compositor(_) => CCI_COMPOSITOR,
|
||||
PaneType::Idle(_) => CCI_IDLE,
|
||||
PaneType::ColorManagement(_) => CCI_COLOR_MANAGEMENT,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -497,7 +506,6 @@ fn bool_ui<R>(
|
|||
});
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
fn read_only_bool(ui: &mut Ui, name: &str, old: bool) {
|
||||
read_only_bool_ui(ui, name, |_| (), old);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue