ROGCC: use the correct colourspace for colour picker

This commit is contained in:
Luke D. Jones
2022-07-29 18:59:52 +12:00
parent 4164b4645d
commit de7fb4a942
4 changed files with 20 additions and 6 deletions

View File

@@ -79,6 +79,18 @@ impl From<Colour> for [f32; 3] {
}
}
impl From<&[u8; 3]> for Colour {
fn from(c: &[u8; 3]) -> Self {
Self(c[0], c[1], c[2])
}
}
impl From<Colour> for [u8; 3] {
fn from(c: Colour) -> Self {
[c.0, c.1, c.2]
}
}
#[cfg_attr(feature = "dbus", derive(Type))]
#[derive(Debug, Copy, Clone, PartialEq, Deserialize, Serialize)]
pub enum Speed {

View File

@@ -258,6 +258,8 @@ impl KeyShape {
}
}
/// Mostly intended as a helper for signalling when to draw a
/// split/compact arrow cluster
pub const fn is_arrow_cluster(&self) -> bool {
match self {
Self::Arrow | Self::ArrowBlank | Self::ArrowSpacer => true,