Commit graph

20 commits

Author SHA1 Message Date
Leandro Pérez G.
65d0f0c7c8
feat(wallpaper): apply EXIF orientation to wallpapers (#2075)
Same fix as pop-os/cosmic-bg#142, which was asked for there.

`open_image` has two decoding paths, and neither applies the Exif
orientation:
`ImageReader::decode` for the common formats, and
`DynamicImage::from_decoder` in
`decode_jpegxl`. Cameras store portrait photos with the pixels laid out
landscape
and record the rotation in the Exif metadata, so such a photo is shown
rotated in
the wallpaper page, both in the preview and in the thumbnails.

Both paths now read the orientation from the decoder and apply it to the
decoded
image. `into_decoder` does not check the allocation limit against the
size of the
decoded image the way `decode` does, so that check is kept explicitly.

Tested with the 8 Exif orientation values, with images that carry no
Exif metadata
(unchanged), and with the JPEG XL wallpapers from gnome-backgrounds,
which decode
identically.

cosmic-greeter needs a different change: it does not decode images
itself. It
passes the raw file bytes to `widget::image::Handle::from_bytes`
(src/common.rs),
and those are decoded by `iced_graphics` with `image::load_from_memory`,
which
does not apply the orientation either. So the orientation has to be
applied before
the handle is built, or in the toolkit.

- [x] I have disclosed use of any AI generated code in my commit
messages.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.

Signed-off-by: Leandro Pérez G. <leandropatodo@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 17:24:25 +02:00
Salvatore Gabriele La Greca
044fc11b2f fix: increased hard-coded wallpapers limit from 100 to 500 2026-07-22 15:41:20 -06:00
Vukašin Vojinović
4b1f388a4f chore: add rustfmt config 2026-05-15 16:26:20 -06:00
Tony Wasserka
c04e49e218 fix(wallpapers): follow symlinks when scanning wallpaper directories
On NixOS, /run/current-system/sw/share/backgrounds lists all wallpapers
installed on the system. The folder entries are symbolic links to the actual
PNG files (each in a dedicated nix store path). Previously WalkDir would skip
over these, resulting in cosmic-settings displaying an empty wallpaper list.

By following symbolic links, the list is now properly populated.
2026-04-22 22:10:24 +02:00
Vukašin Vojinović
787c5ed49f chore: clippy 2026-02-20 12:46:57 +01:00
Vukašin Vojinović
842e6f4bac improv(startup_apps): match designs
Adds an empty list item with text when there aren't any startup apps and replaces the heading with a modified description (removing the description).
2025-08-28 14:24:44 +02:00
Michael Aaron Murphy
fbe004b031
fix: use image feature of jxl-oxide to fix image decoding error 2025-08-18 16:11:13 +02:00
Vukašin Vojinović
a0f7b31d89 chore(appearance): disable wrapping for style text
Also updates all workspace members to Rust 2024, removes `once_cell` and updates dependencies.
2025-07-31 17:23:10 +02:00
Eduardo Flores
8ca65bafe4 fix: wallpaper discovery
Allows settings to show installed wallpapers.

- Modified `load_each_from_path` to recursively
discover wallpapers, limited depth to 3 for
performance.
2025-06-16 17:14:30 +02:00
Michael Aaron Murphy
92085b60ab
fix(wallpapers): filter images by extension 2025-03-04 17:09:59 +01:00
Michael Aaron Murphy
0bf63a0d91
perf(wallpaper): avoid recursion for system wallpapers 2025-01-11 12:19:39 +01:00
Michael Aaron Murphy
1b5e9aa317 feat(wallpaper): support JPEG XL wallpapers 2024-10-10 21:37:53 +02:00
Michael Aaron Murphy
b004b9d815
chore: update dependencies
Fixes #318
2024-07-31 08:10:48 +02:00
Vukašin Vojinović
b59b93625a fix(wallpaper): fix gradient direction
Also adds one missing gradient present in the designs.
2024-07-04 01:40:44 +02:00
Michael Aaron Murphy
f48bb86495
fix(wallpaper): limit to 100 wallpapers loaded 2024-03-12 07:45:44 +01:00
Michael Aaron Murphy
a0017eeb9c
fix(wallpaper): avoid walking custom paths for wallpapers 2024-03-12 07:45:44 +01:00
Michael Aaron Murphy
dafbe30920
perf(wallpaper): improve thumbnail load parallelism 2024-03-12 07:45:44 +01:00
Michael Aaron Murphy
39d0c6f7cf
fix(wallpaper): get current slideshow image from cosmic-bg state 2024-02-29 14:25:53 +01:00
Michael Aaron Murphy
d943b5bd70 feat(wallpaper): get last active image from cosmic-bg when toggling slideshow 2024-01-31 16:17:57 +01:00
Michael Aaron Murphy
e7c9595578 improv(wallpaper): share display listing logic with display page 2024-01-30 17:24:14 +01:00