From c6d46af82dbcc642ef19e6a9dd6a7ac2278e0ca6 Mon Sep 17 00:00:00 2001 From: itsjunetime Date: Sun, 26 May 2024 18:36:49 -0600 Subject: [PATCH] Relax margins a bit to make it work better with less space --- build_most_optimized.sh | 1 + src/tui.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build_most_optimized.sh b/build_most_optimized.sh index cd9f867..d37f409 100644 --- a/build_most_optimized.sh +++ b/build_most_optimized.sh @@ -1 +1,2 @@ +#!/usr/bin/env bash RUSTFLAGS="-Cpanic=abort -Ccodegen-units=1 -Cembed-bitcode=yes -Zdylib-lto -Copt-level=s -Zlocation-detail=none -Cstrip=symbols -Ctarget-cpu=native" cargo -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort build --profile production --target "$(rustc +nightly -Z unstable-options --print target-spec-json | jq -r '."llvm-target"')" diff --git a/src/tui.rs b/src/tui.rs index 99e4108..9799c01 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -82,11 +82,12 @@ impl Tui { Constraint::Fill(1), Constraint::Length(3) ]) - .horizontal_margin(4) - .vertical_margin(2) + .horizontal_margin(2) + .vertical_margin(1) .split(frame.size()) } + // TODO: Make a way to fill the width of the screen with one page and scroll down to view it pub fn render(&mut self, frame: &mut Frame<'_>, main_area: &[Rect], end_update: &mut bool) { let top_block = Block::new() .padding(Padding {