Add pane resizing
This commit is contained in:
@@ -53,12 +53,24 @@ pub struct AppearanceOverride {
|
||||
pub font_size: Option<u32>,
|
||||
}
|
||||
|
||||
/// Pane layout proportions (fractions of the window width, 0..1).
|
||||
/// Pane layout proportions and constraints.
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct LayoutConfig {
|
||||
/// Initial fraction of the window width for the left pane (0..1).
|
||||
pub left_pane_fraction: f32,
|
||||
/// Initial fraction of the window width for the right pane (0..1).
|
||||
pub right_pane_fraction: f32,
|
||||
/// Minimum width of the left pane in pixels.
|
||||
pub left_pane_min: i32,
|
||||
/// Maximum width of the left pane in pixels.
|
||||
pub left_pane_max: i32,
|
||||
/// Minimum width of the right pane in pixels.
|
||||
pub right_pane_min: i32,
|
||||
/// Maximum width of the right pane in pixels.
|
||||
pub right_pane_max: i32,
|
||||
/// Minimum width of the center pane in pixels.
|
||||
pub center_pane_min: i32,
|
||||
}
|
||||
|
||||
impl Default for LayoutConfig {
|
||||
@@ -66,6 +78,11 @@ impl Default for LayoutConfig {
|
||||
Self {
|
||||
left_pane_fraction: 0.20,
|
||||
right_pane_fraction: 0.35,
|
||||
left_pane_min: 120,
|
||||
left_pane_max: 600,
|
||||
right_pane_min: 150,
|
||||
right_pane_max: 600,
|
||||
center_pane_min: 200,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user