Commit graph

6 commits

Author SHA1 Message Date
496614f790 feat(pdf): improve PDF rendering quality and zoom sharpness
- Change PDF_RENDER_QUALITY from 2.0 to 3.0 for higher resolution rendering
- Replace PNG round-trip with direct Cairo surface → DynamicImage conversion
- Convert ARgb32 to RGBA directly, avoiding PNG encoding/decoding artifacts
- Switch image filter from Nearest to Linear for smoother zoom display
- Remove unused Cursor and ImageReader imports
- Strip release binary to reduce size from 612MB to 36MB
2026-05-21 19:59:07 +02:00
wfx
1182b7b55d feature: PDF and PDF thumbnails and refresh UI
- Implement PDF and PDF thumbnail generation with incremental loading
- Add UI refresh mechanism (tick counter + RefreshView message)
- Improve fl! macro with named parameters
- Clean up code organization (mod.rs: wiring, model.rs: state only)
2026-01-18 20:35:12 +01:00
wfx
220a886acc feat: add set as wallpaper functionality
Add ability to set current image as desktop wallpaper with keyboard
shortcut 'W' and icon button in Properties panel.

Supports COSMIC, GNOME, KDE, XFCE, and tiling window managers via
automatic detection and fallback mechanism.

Implementation uses wallpaper crate with custom COSMIC config file
integration and gsettings/feh fallbacks.
2026-01-15 20:40:53 +01:00
wfx
e71a97a2cb fix(config): use XDG picture directory as default
Replace hardcoded \"~/Pictures\" with dirs::picture_dir() which resolves
to the actual absolute path (e.g. /home/user/Pictures).

The tilde (~) in paths is not automatically expanded by Rust's PathBuf,
causing path.exists() to return false for \"~/Pictures\".

Using dirs::picture_dir() provides:
- Proper absolute path resolution
- XDG Base Directory compliance
- Fallback to home directory if Pictures doesn't exist

Note: Users with existing config files need to delete
~/.config/cosmic/org.codeberg.wfx.Noctua/v1/default_image_dir
to apply the new default."
2026-01-14 21:03:06 +01:00
wfx
823dfe9fa2 Implement comprehensive metadata extraction for raster images with
EXIF support and display in the right panel.

New features:
- Extract basic metadata (filename, format, resolution, file size, color type)
- Parse EXIF data (camera, date, exposure, aperture, ISO, focal length, GPS)
- Display metadata in collapsible right panel (toggle with 'i' key)
- Auto-refresh metadata on document navigation

Changes by file:

Cargo.toml, Cargo.lock:
- Add kamadak-exif dependency for EXIF parsing

i18n/en/noctua.ftl:
- Add translation strings for all metadata labels

src/app/document/meta.rs:
- New module for metadata types (BasicMeta, ExifMeta, DocumentMeta)
- Extraction logic with EXIF parsing via kamadak-exif
- Helper methods for formatted display (resolution, file size, camera, GPS)

src/app/document/mod.rs:
- Re-export meta module

src/app/document/{raster,vector,portable}.rs:
- Add extract_metadata() method stubs (full impl for raster)

src/app/document/file.rs:
- Reset metadata on document change

src/app/message.rs:
- Add ToggleRightPanel and RefreshMetadata messages

src/app/model.rs:
- Add metadata: Option<DocumentMeta> field
- Add show_right_panel: bool field

src/app/update.rs:
- Handle panel toggle and metadata refresh
- Auto-refresh metadata on navigation when panel visible

src/app/view/panels.rs:
- Implement right_panel() with metadata display
- Conditional sections for basic info and EXIF data

src/app/view/canvas.rs:
- Integrate right panel into layout"
2026-01-10 11:46:07 +01:00
wfx
ab93f649bd chore: initial commit 2026-01-07 20:22:49 +01:00