restruct: 45e

This commit is contained in:
i do not exist 2026-06-24 06:39:43 +03:00
parent b3e9cde8a1
commit 027f69cd50
9 changed files with 264 additions and 270 deletions

View file

@ -1,5 +1,11 @@
use crate::*;
/// Default scene height.
pub const H_SCENE: usize = 2;
/// Default editor height.
pub const H_EDITOR: usize = 15;
/// A scene consists of a set of clips to play together.
///
/// ```
@ -51,10 +57,6 @@ impl Scene {
}
pub trait ScenesView: HasEditor + HasSelection + HasSceneScroll + HasClipsSize + Send + Sync {
/// Default scene height.
const H_SCENE: usize = 2;
/// Default editor height.
const H_EDITOR: usize = 15;
fn h_scenes (&self) -> u16;
fn w_side (&self) -> u16;
fn w_mid (&self) -> u16;
@ -70,7 +72,7 @@ pub trait ScenesView: HasEditor + HasSelection + HasSceneScroll + HasClipsSize +
let height = if self.selection().scene() == Some(s) && self.editor().is_some() {
8
} else {
Self::H_SCENE
H_SCENE
};
if y + height <= self.clips_size().h() as usize {
let data = (s, scene, y, y + height);