mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
This commit is contained in:
parent
cc88743054
commit
87cd6099ad
11 changed files with 139 additions and 139 deletions
|
|
@ -3,7 +3,7 @@ pub(crate) use std::fmt::Write;
|
|||
pub(crate) use ::tengri::tui::ratatui::prelude::Position;
|
||||
|
||||
#[tengri_proc::view(TuiOut)]
|
||||
impl Tek {
|
||||
impl App {
|
||||
fn view_nil (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
"nil"
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ impl Tek {
|
|||
}
|
||||
}
|
||||
|
||||
impl Tek {
|
||||
impl App {
|
||||
fn view_dialog_menu (&self) -> impl Content<TuiOut> {
|
||||
let options = ||["Projects", "Settings", "Help", "Quit"].iter();
|
||||
let option = |a,i|Tui::fg(Rgb(255,255,255), format!("{}", a));
|
||||
|
|
@ -148,7 +148,7 @@ impl Tek {
|
|||
self.tracks().iter().enumerate().map(move |(index, track)|{
|
||||
let width = if Some(index) == active.copied() { bigger } else { track.width.max(8) };
|
||||
let data = (index, track, x, x + width);
|
||||
x += width + Tek::TRACK_SPACING;
|
||||
x += width + App::TRACK_SPACING;
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
@ -180,7 +180,7 @@ impl Tek {
|
|||
}
|
||||
|
||||
pub(crate) struct ArrangerView<'a> {
|
||||
app: &'a Tek,
|
||||
app: &'a App,
|
||||
|
||||
is_editing: bool,
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ impl<'a> Content<TuiOut> for ArrangerView<'a> {
|
|||
}
|
||||
|
||||
impl<'a> ArrangerView<'a> {
|
||||
pub fn new (app: &'a Tek) -> Self {
|
||||
pub fn new (app: &'a App) -> Self {
|
||||
Self {
|
||||
app,
|
||||
is_editing: app.is_editing(),
|
||||
|
|
@ -436,7 +436,7 @@ impl<'a> ArrangerView<'a> {
|
|||
let Self {
|
||||
width, width_side, width_mid,
|
||||
scenes_height, scene_last, scene_selected,
|
||||
track_selected, is_editing, app: Tek { editor, .. }, ..
|
||||
track_selected, is_editing, app: App { editor, .. }, ..
|
||||
} = self;
|
||||
|
||||
let scene_headers = Map::new(||self.scenes_with_scene_colors(),
|
||||
|
|
@ -530,7 +530,7 @@ impl<'a> ArrangerView<'a> {
|
|||
pub(crate) fn scenes_with_scene_colors (&self)
|
||||
-> impl ScenesColors<'_>
|
||||
{
|
||||
self.app.scenes_with_sizes(self.is_editing, Tek::H_SCENE, Tek::H_EDITOR).map_while(
|
||||
self.app.scenes_with_sizes(self.is_editing, App::H_SCENE, App::H_EDITOR).map_while(
|
||||
move|(s, scene, y1, y2)|if y2 as u16 > self.scenes_height {
|
||||
None
|
||||
} else {
|
||||
|
|
@ -545,7 +545,7 @@ impl<'a> ArrangerView<'a> {
|
|||
pub(crate) fn scenes_with_track_colors (&self, track: usize)
|
||||
-> impl ScenesColors<'_>
|
||||
{
|
||||
self.app.scenes_with_sizes(self.is_editing, Tek::H_SCENE, Tek::H_EDITOR).map_while(
|
||||
self.app.scenes_with_sizes(self.is_editing, App::H_SCENE, App::H_EDITOR).map_while(
|
||||
move|(s, scene, y1, y2)|if y2 as u16 > self.scenes_height {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue