pub enum ResolvedSidebarLayout {
Hidden,
SideBySide {
sidebar_left: bool,
},
Stacked,
}Expand description
The concrete layout the renderer should draw for the current frame,
resolved from open + orientation + position + terminal width by
SidebarState::resolve_layout. Kept ratatui-free so the decision
is unit-testable against the width contract without a backend.
Variants§
Hidden
Sidebar closed — draw the worktree table full-area.
SideBySide
Side-by-side split. sidebar_left mirrors SidebarPosition:
true draws the sidebar on the left of the table, false on the
right.
Fields
Stacked
Stacked split — table on top, sidebar below.
Implementations§
Source§impl ResolvedSidebarLayout
impl ResolvedSidebarLayout
Sourcepub fn split_percentages(self) -> Option<(u16, u16)>
pub fn split_percentages(self) -> Option<(u16, u16)>
The (table_pct, sidebar_pct) split this layout draws, or None
when the sidebar is hidden (the table takes the whole area). Issue
#217 tuned the ratios per axis: stacked vertically the status pane
gets the larger share (42% table / 58% status) so commits + issue/PR
have room; side-by-side the table stays dominant (55% / 45%). Pure +
ratatui-free so the contract is pinned without a backend.
Trait Implementations§
Source§impl Clone for ResolvedSidebarLayout
impl Clone for ResolvedSidebarLayout
Source§fn clone(&self) -> ResolvedSidebarLayout
fn clone(&self) -> ResolvedSidebarLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ResolvedSidebarLayout
Source§impl Debug for ResolvedSidebarLayout
impl Debug for ResolvedSidebarLayout
impl Eq for ResolvedSidebarLayout
Source§impl PartialEq for ResolvedSidebarLayout
impl PartialEq for ResolvedSidebarLayout
Source§fn eq(&self, other: &ResolvedSidebarLayout) -> bool
fn eq(&self, other: &ResolvedSidebarLayout) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResolvedSidebarLayout
Auto Trait Implementations§
impl Freeze for ResolvedSidebarLayout
impl RefUnwindSafe for ResolvedSidebarLayout
impl Send for ResolvedSidebarLayout
impl Sync for ResolvedSidebarLayout
impl Unpin for ResolvedSidebarLayout
impl UnsafeUnpin for ResolvedSidebarLayout
impl UnwindSafe for ResolvedSidebarLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more