mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
feat(editor): resizable outline panel (#161)
Add a drag handle to resize the outline panel and persist its width in vault state (outline_width). Outline text now scales with the editor font size. Reviewed-on: https://codeberg.org/ArkHost/HelixNotes/pulls/161
This commit is contained in:
@@ -197,6 +197,10 @@ fn default_true() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn default_outline_width() -> f64 {
|
||||
220.0
|
||||
}
|
||||
|
||||
fn default_pdf_height() -> u32 {
|
||||
600
|
||||
}
|
||||
@@ -298,6 +302,8 @@ pub struct VaultState {
|
||||
pub last_open_note: Option<String>,
|
||||
pub sidebar_width: f64,
|
||||
pub notelist_width: f64,
|
||||
#[serde(default = "default_outline_width")]
|
||||
pub outline_width: f64,
|
||||
pub sidebar_collapsed: bool,
|
||||
#[serde(default)]
|
||||
pub notelist_collapsed: bool,
|
||||
@@ -333,6 +339,7 @@ impl Default for VaultState {
|
||||
last_open_note: None,
|
||||
sidebar_width: 220.0,
|
||||
notelist_width: 280.0,
|
||||
outline_width: default_outline_width(),
|
||||
sidebar_collapsed: false,
|
||||
notelist_collapsed: false,
|
||||
collapsed_notebooks: Vec::new(),
|
||||
|
||||
Reference in New Issue
Block a user