feat(ui): add header toolbar with navigation and transform buttons

- Add header bar with nav toggle, prev/next, rotate and flip buttons
- Extract header rendering to view/header.rs (MVU architecture)
- Add RotateCW, RotateCCW, FlipHorizontal, FlipVertical messages
- Add PrevDocument, NextDocument navigation messages
- Persist nav_bar_visible and context_drawer_visible in config
- Update properties panel with document info display"
This commit is contained in:
mow 2026-01-14 18:53:36 +01:00
parent b1b0999ebe
commit 7b36ff143c
8 changed files with 232 additions and 90 deletions

View file

@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// src/config.rs
//
// Global configuration for the application with cosmic-config support.
use cosmic::cosmic_config::{self, CosmicConfigEntry, cosmic_config_derive::CosmicConfigEntry};
use std::path::PathBuf;
@ -10,6 +12,10 @@ use std::path::PathBuf;
pub struct AppConfig {
/// Optional default directory to open images from.
pub default_image_dir: Option<PathBuf>,
/// Whether the nav bar (left panel) is visible.
pub nav_bar_visible: bool,
/// Whether the context drawer (right panel) is visible.
pub context_drawer_visible: bool,
}
impl Default for AppConfig {
@ -17,6 +23,8 @@ impl Default for AppConfig {
Self {
// TODO: Use xdg dir for picture
default_image_dir: Some(PathBuf::from("~/Pictures")),
nav_bar_visible: false,
context_drawer_visible: false,
}
}
}