# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.3.0] - 2026-03-19
### Added
- Custom application icon (window title bar and taskbar)
- Debug logger (`src/logger.rs`) with structured log output
### Changed
- New window design: standard OS title bar replaces the custom-drawn one
- Menu layout rebuilt for clarity and consistency
- Read and Clear buttons relocated within the UI
- UI text style updated across the application
- UI font color handling improved
- Color theme elements updated for better visual coherence
- `vsync: false` set in `NativeOptions` to reduce unnecessary GPU load
### Fixed
- Left-alignment content rendering: text no longer overflows or misaligns when alignment is set to Left
- Clipboard operation freezing: eliminated deadlock/hang when clipboard access overlaps with UI updates
- 5 critical stability issues resolved (race conditions, panics, rendering artifacts)
- Resizable window border behaviour corrected
- Various diagnostic fixes and logging noise reduced
## [0.2.0+060] - 2026-03-16
### Added
- **Line spacing** setting in Preferences/Appearance: slider from 0.8× to 3.0× (step 0.1, default 1.0)
- Applied via `TextFormat::line_height` in all rendering paths (Left/Center/Right/Justify)
## [0.2.0+027] - 2026-03-16
### Removed
- **Font preview** block removed from Preferences window
## [0.2.0+026] - 2026-03-16
### Added
- **Text alignment** setting in Preferences: Left, Center, Right, Justify
- Justify is the default alignment — word spacing is stretched so each wrapped line fills the full content width (last line of each paragraph remains left-aligned)
- Center and Right alignment use egui's Label widget with correct galley origin offset (`center_top` / `right_top`), fixing a rendering issue where text would appear outside the visible area when using `TextEdit` with a custom layouter
- `TextAlign` enum in `settings.rs` with serde serialization; existing settings files without the field fall back to `Justify` via `#[serde(default)]`
## [0.2.0+024] - 2026-03-15
### Added
- **File → Save…** menu item: saves the current content to a file via a native OS save dialog; pre-fills the filename with the currently open file name (or `untitled.txt`); updates the footer label after saving
## [0.2.0+024] - 2026-03-15
### Added
- **File → Open…** menu item: opens a native OS file picker dialog to load a text file without using the command line
- `rfd` crate dependency for native file dialogs (Windows/macOS/Linux)
### Added
- CLI arguments: `-v`/`--version` and `-h`/`--help`
- `-d`/`--debug` flag: runs the app in the current terminal process with logging enabled
- Default (no flags) launch now spawns the GUI as a detached background process — the terminal is released immediately and no console window is shown
- File reading: `qreader file.txt` opens a text file directly in the viewer
- `FileReaderRegistry` with `FileReader` trait — extensible architecture for adding new file formats (PDF, DOCX, etc.) without changing existing code
- Plain text reader supports: txt, log, md, json, toml, yaml, rs, py, and more
- Window title shows filename when a file is opened
- Footer shows file name and stats (lines, words) in file mode
### Fixed
- Font panic on startup: system fonts (e.g. Trebuchet MS) are now registered via `CreationContext` before the first frame, using the eframe-recommended pattern instead of lazy initialization inside `update()`
## [0.2.0+017] - 2026-03-12
### Added
- Left and right text margins in the content area (default 20 mm), configurable in Preferences
- Ctrl+V (and right-click paste) now reads and displays clipboard content
- Ctrl+Scroll to increase/decrease content font size (uses egui `zoom_delta()`)
- Settings file is automatically created with default values if missing on startup
### Changed
- Removed Ctrl+Q exit shortcut; Alt+F4 remains the keyboard exit method
### Fixed
- Settings not loaded after adding new fields: added `#[serde(default)]` to `Settings` struct so missing fields fall back to defaults instead of failing to load
## [0.2.0+007] - 2026-03-02
### Added
- Font color customization in Preferences window
- Live font preview panel in Preferences window
- Keyboard shortcut: Alt+F4 to exit
- `build.rs` for automatic version synchronization to README.md and CHANGELOG.md
### Changed
- Settings file moved to `%APPDATA%\qreader\qreader_settings.json` on Windows
- Minimum clipboard auto-update interval increased to 200 ms for system stability
- Settings auto-save with 2-second debounce to reduce unnecessary writes
- All source code comments translated to English
### Fixed
- Duplicate `Settings::load()` on startup — settings are now loaded once in `main()` and passed to `ClipboardApp`
- Simultaneous clipboard operation guard via `clipboard_operation_in_progress` flag
- Style hash-based change detection prevents redundant egui style updates
## [0.1.0] - Initial Release
### Added
- Real-time clipboard monitoring with configurable auto-update
- Customizable fonts: Default, Monospace, Serif, Sans Serif
- Adjustable font sizes for UI and content areas independently
- Background color customization
- Text statistics: line count, word count, last update time
- Always-on-top window option
- Settings persistence via JSON file next to executable
- Windows system fonts support (Times New Roman, Arial)
- Rate-limited clipboard access to prevent system locks