Skip to content

Commit

Permalink
update layout
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpasmantier committed Oct 14, 2024
1 parent e83fabb commit ba86a24
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "television"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
description = "The revolution will be televised."
license = "MIT"
Expand Down
6 changes: 3 additions & 3 deletions crates/television/television.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ impl Television {
///
/// * `Result<()>` - An Ok result or an error.
pub fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> {
//let layout = Layout::all_panes_centered(Dimensions::default(), area);
let layout =
Layout::results_only_centered(Dimensions::new(40, 60), area);
let layout = Layout::all_panes_centered(Dimensions::default(), area);
//let layout =
// Layout::results_only_centered(Dimensions::new(40, 60), area);

self.results_area_height = u32::from(layout.results.height);
if let Some(preview_window) = layout.preview_window {
Expand Down
1 change: 1 addition & 0 deletions crates/television/ui/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ impl Layout {
}

/// TODO: add diagram
#[allow(dead_code)]
pub fn results_only_centered(dimensions: Dimensions, area: Rect) -> Self {
let main_block = centered_rect(dimensions.x, dimensions.y, area);
// split the main block into two vertical chunks
Expand Down

0 comments on commit ba86a24

Please sign in to comment.