diff --git a/crates/app/src/layout.rs b/crates/app/src/layout.rs index 6c51aeb..12df766 100644 --- a/crates/app/src/layout.rs +++ b/crates/app/src/layout.rs @@ -12,7 +12,9 @@ pub(crate) const GHOST_MIN: f32 = 2.; pub(crate) const HEADER_H: f32 = 32.; // 28 button row + 24 scrub strip + two 48 lanes + the timecode line + the gaps // between them, with a few px of slack so a taller text line cannot push a lane -// off the bottom. +// off the bottom. The window measures itself from [`timeline_h`] now, so this +// figure is the guards' anchor for it and sits with them. +#[cfg(test)] pub(crate) const PANEL_H: f32 = 220.; /// How many lane rows are drawn before the lane column starts scrolling: past /// this the panel would be taller than the picture it belongs under, and a @@ -230,14 +232,15 @@ pub(crate) fn px_below(max_offset_h: f32, offset_y: f32) -> f32 { /// How tall the panel is with `lanes` tracks in it: [`PANEL_H`] is sized for the /// two a project starts with, and every further one adds its own row -- up to /// [`LANES_MAX`], past which the lane column scrolls instead and the panel stops -/// growing. +/// growing. Only the guards ask, so it sits with them. +#[cfg(test)] pub(crate) fn panel_h(lanes: usize) -> f32 { PANEL_H + lanes_h(lanes.clamp(2, LANES_MAX)) - lanes_h(2) } /// How tall the timeline region is: its own padding, the timecode line, the /// ruler and the gaps between them, plus a row per lane. Measured from its -/// parts rather than taken off [`PANEL_H`] -- the button row moved out of it +/// parts rather than taken off `PANEL_H` -- the button row moved out of it /// ([`Player::toolbar`]), and a height still carrying that row's pixels is a /// height that cuts the last lane off the bottom of the window. pub(crate) fn timeline_h(lanes: usize) -> f32 { diff --git a/crates/app/src/transport.rs b/crates/app/src/transport.rs index a67c1ae..ba11a20 100644 --- a/crates/app/src/transport.rs +++ b/crates/app/src/transport.rs @@ -81,8 +81,10 @@ impl Volume { u32::from(self.steps) * 100 / u32::from(Self::MAX_STEPS) } - /// What the button reads. The level shows while muted too: it is what the - /// next press of the mute key brings back. + /// What the button read before the mute state became a glyph and a colour + /// ([`Player::toolbar`]): the guards still hold the wording to it, so it + /// sits with them rather than in the binary. + #[cfg(test)] pub(crate) fn label(self) -> String { let percent = u32::from(self.steps) * 100 / u32::from(Self::MAX_STEPS); if self.muted { diff --git a/crates/app/src/ui/theme.rs b/crates/app/src/ui/theme.rs index ffa39f6..1713500 100644 --- a/crates/app/src/ui/theme.rs +++ b/crates/app/src/ui/theme.rs @@ -99,7 +99,6 @@ palette! { SCRIM: u32, SCRIM_LIGHT: u32, STROKE_DIVIDER: u32, - STROKE_FOCUS: u32, STROKE_SELECTED: u32, FG_PRIMARY: u32, FG_SECONDARY: u32, @@ -229,7 +228,9 @@ impl PaletteId { } /// The numbers themselves, for anything that has to measure a family that - /// is not the one in force -- which is what the contrast guards do. + /// is not the one in force -- which is only the contrast guards, so it sits + /// with them rather than in the binary. + #[cfg(test)] pub fn palette(self) -> &'static Palette { &PALETTES[self as usize] } @@ -320,9 +321,6 @@ pub mod cool { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x2a3442; - /// The keyboard's own ring, distinct from selection on purpose: focus is - /// where the next stroke lands, selection is what an edit acts on. - pub const STROKE_FOCUS: u32 = 0xffd166; pub const STROKE_SELECTED: u32 = 0x22d3ee; // -- text ------------------------------------------------------------------- @@ -395,7 +393,6 @@ pub mod warm { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x3a322e; - pub const STROKE_FOCUS: u32 = 0xffc38a; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -461,7 +458,6 @@ pub mod forest { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x25362c; - pub const STROKE_FOCUS: u32 = 0xffd166; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -526,7 +522,6 @@ pub mod violet { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x2e3150; - pub const STROKE_FOCUS: u32 = 0xfde68a; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -586,7 +581,6 @@ pub mod rose { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x332f33; - pub const STROKE_FOCUS: u32 = 0xfcd34d; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -631,8 +625,7 @@ pub mod rose { } /// Family F: a graphite ground -- neutral, a touch warm -- under one gold -/// accent. The focus ring turns sky here: gold is the accent now, and the -/// keyboard's ring is the one thing that may never be mistaken for it. +/// accent. pub mod amber { // -- surfaces --------------------------------------------------------------- pub const BG_CANVAS: u32 = 0x0d0d0c; @@ -649,7 +642,6 @@ pub mod amber { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x35352f; - pub const STROKE_FOCUS: u32 = 0x7dd3fc; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -709,9 +701,6 @@ pub mod ocean { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x1e2d42; - /// Gold, not azure: on a blue ground the accent is the one hue the chrome is - /// full of, and a focus ring wearing it says nothing. - pub const STROKE_FOCUS: u32 = 0xffd166; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -772,7 +761,6 @@ pub mod ice { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x223140; - pub const STROKE_FOCUS: u32 = 0xfcd34d; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -831,9 +819,6 @@ pub mod orchid { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x33203f; - /// Sky: the ring is neither the orchid the window is full of nor the gold - /// the playhead is, so all three are told apart at a glance. - pub const STROKE_FOCUS: u32 = 0x7dd3fc; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -901,9 +886,6 @@ pub mod nord { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x434c5e; - /// `nord12`. The Frost blue is the accent here, so the ring is Aurora's - /// orange -- and the playhead is the yellow beside it, never this. - pub const STROKE_FOCUS: u32 = 0xd08770; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -955,9 +937,9 @@ pub mod nord { /// and `bg2` are the surfaces verbatim and `fg1`..`fg4` the ink; the clip bodies /// are the neutral-mode hues taken down for the same reason Nord's are. /// -/// Three of its colours do three jobs here rather than one: orange is the -/// accent, green the playhead, blue the focus ring -- so the family is -/// recognisable from the chrome and not only from the ground. +/// Two of its colours do two jobs here rather than one: orange is the accent +/// and green the playhead -- so the family is recognisable from the chrome and +/// not only from the ground. pub mod gruvbox { // -- surfaces --------------------------------------------------------------- pub const BG_CANVAS: u32 = 0x1d2021; @@ -974,7 +956,6 @@ pub mod gruvbox { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x504945; - pub const STROKE_FOCUS: u32 = 0x83a598; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -1036,7 +1017,6 @@ pub mod dracula { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x44475a; - pub const STROKE_FOCUS: u32 = 0x8be9fd; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- diff --git a/vendor/rusty_h264-common/src/deblock.rs b/vendor/rusty_h264-common/src/deblock.rs index d325235..04c3e11 100644 --- a/vendor/rusty_h264-common/src/deblock.rs +++ b/vendor/rusty_h264-common/src/deblock.rs @@ -330,6 +330,9 @@ fn bs1_tile(p: &Blk, q: &Blk) -> bool { /// Boundary strength from tile entries (spec §8.7.2.1). /// Branchless for the same reason as [`BlockInfo::bs_branchless`], but now with /// every operand already in a register rather than behind a strided load. +// --- edith patch: only the `#[cfg(test)]` tile guards below call this, so it +// sits with them rather than warning in every build. --- +#[cfg(test)] #[inline] fn bs_tile(p: &Blk, q: &Blk, mb_edge: bool) -> i32 { let intra = !(p.inter & q.inter); diff --git a/vendor/rusty_h264-common/src/inter.rs b/vendor/rusty_h264-common/src/inter.rs index e138655..4edb87b 100644 --- a/vendor/rusty_h264-common/src/inter.rs +++ b/vendor/rusty_h264-common/src/inter.rs @@ -510,6 +510,8 @@ fn avg_full(t: &[u8], ts: usize, bw: usize, bh: usize, dr: usize, dc: usize, hal } /// A/B: restore half→scratch→avg compose for one-filter qpel (`RS_H264_QPEL_COMPOSE=1`). +// --- edith patch: both call sites are `#[cfg(accel)]`, so the switch is too. --- +#[cfg(accel)] #[inline] fn qpel_compose() -> bool { use std::sync::OnceLock;