mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-09-18 12:56:42 +02:00
restruct: 45e
This commit is contained in:
parent
b3e9cde8a1
commit
027f69cd50
9 changed files with 264 additions and 270 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue